Uxn program file

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{FormatInfo |formattype=electronic |subcat=Executables |extensions={{ext|rom}} }} Uxn is a simple virtual machine. A Uxn program file is loaded into the virtual machine's me...")
 
(Better explanation of the first byte of a uxn program file.)
 
(One intermediate revision by one user not shown)
Line 6: Line 6:
  
 
Uxn is a simple virtual machine. A Uxn program file is loaded into the virtual machine's memory starting at address 0x0100, and then execution starts at address 0x0100.
 
Uxn is a simple virtual machine. A Uxn program file is loaded into the virtual machine's memory starting at address 0x0100, and then execution starts at address 0x0100.
 +
 +
== Identification ==
 +
A uxn program can potentially have any sequence of bytes, since any sequence is valid (there are no errors in uxn). However, it is most likely to have the first byte being 0x40, 0x60, 0x80, 0xA0, 0xC0, or 0xE0; others are not very useful as the first byte (if it is 0x00 then the program won't do anything, and anything else will read data from the stack (will will be meaningless data if nothing has been pushed to the stack already)).
 +
 +
A uxn file with metadata will have {{magic|A0 xx xx 80 06 37}} as the first six bytes, where the second and third bytes are a big-endian 16-bit address of the metadata (where the beginning of the file is address 0x0100).
  
 
== Links ==
 
== Links ==
 
* https://wiki.xxiivv.com/site/uxn.html
 
* https://wiki.xxiivv.com/site/uxn.html

Latest revision as of 04:41, 16 July 2024

File Format
Name Uxn program file
Ontology
Extension(s) .rom

Uxn is a simple virtual machine. A Uxn program file is loaded into the virtual machine's memory starting at address 0x0100, and then execution starts at address 0x0100.

[edit] Identification

A uxn program can potentially have any sequence of bytes, since any sequence is valid (there are no errors in uxn). However, it is most likely to have the first byte being 0x40, 0x60, 0x80, 0xA0, 0xC0, or 0xE0; others are not very useful as the first byte (if it is 0x00 then the program won't do anything, and anything else will read data from the stack (will will be meaningless data if nothing has been pushed to the stack already)).

A uxn file with metadata will have A0 xx xx 80 06 37 as the first six bytes, where the second and third bytes are a big-endian 16-bit address of the metadata (where the beginning of the file is address 0x0100).

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox