Difference between revisions of "VM instructions / opcodes"
Jump to navigation
Jump to search
m |
m |
||
Line 1: | Line 1: | ||
Final Fantasy XII VM supports 100 known opcodes. There are three types of instructions. Instructions '''with an immediate''', which are '''3 bytes''' long, instructions '''without immediate''', which are '''1 byte''' long and special instructions like '''NOP''' and '''LABEL''' that have a defined '''size of zero''' and thus can't be used, because it causes the VM to loop indefinitely. These are probably used only by compiler and never put in the code itself. | Final Fantasy XII VM supports 100 known opcodes. There are three types of instructions. Instructions '''with an immediate''', which are '''3 bytes''' long, instructions '''without immediate''', which are '''1 byte''' long and special instructions like '''NOP''' and '''LABEL''' that have a defined '''size of zero''' and thus can't be used, because it causes the VM to loop indefinitely. These are probably used only by compiler and never put in the code itself. | ||
− | {| class="wikitable" | + | {| class="wikitable sortable" |
|+ | |+ | ||
!Name | !Name |
Revision as of 09:52, 15 July 2019
Final Fantasy XII VM supports 100 known opcodes. There are three types of instructions. Instructions with an immediate, which are 3 bytes long, instructions without immediate, which are 1 byte long and special instructions like NOP and LABEL that have a defined size of zero and thus can't be used, because it causes the VM to loop indefinitely. These are probably used only by compiler and never put in the code itself.
Name | Opcode | Size | Immediate | Arguments | Description |
---|---|---|---|---|---|
NOP | 0x00 | 0 | no | 0 | Don't use. It causes eternal loop |
LABEL | 0x01 | 0 | no | 0 | Don't use. It causes eternal loop |
TAG | 0x02 | 0 | no | 0 | Don't use. It causes eternal loop |
SYSHALT | 0x03 | 1 | no | 0 | |
SYSTEM | 0x04 | 1 | no | 1 | |
OPLOR | 0x05 | 1 | no | 2 | Logical or |
OPLAND | 0x06 | 1 | no | 2 | Logical and |
OPOR | 0x07 | 1 | no | 2 | Binary or |
OPEOR | 0x08 | 1 | no | 2 | Binary exclusive or |
OPAND | 0x09 | 1 | no | 2 | Binary and |