Difference between revisions of "VM instructions / opcodes"

From Final Fantasy XII Wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:Final Fantasy XII VM instructions / opcodes}} Final Fantasy XII VM supports 100 known opcodes. There are three types of instructions. Instructions '''with an i...")
 
Line 34: Line 34:
 
|SYSHALT
 
|SYSHALT
 
|0x03
 
|0x03
 +
|1
 +
|no
 
|0
 
|0
 +
|
 +
|-
 +
|SYSTEM
 +
|0x04
 +
|1
 
|no
 
|no
|0
+
|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
 
|}
 
|}
 +
[[Category:Instructions]]
 +
[[Category:VM]]
 +
[[Category:General]]

Revision as of 09:50, 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