Difference between revisions of "VM for transfer"

From Apertium
Jump to navigation Jump to search
Line 4: Line 4:
 
! Mnemonic !! Opcode<br>''(in hex)'' !! Other operands !! Stack<br>[before]&rarr;[after] !! Description
 
! Mnemonic !! Opcode<br>''(in hex)'' !! Other operands !! Stack<br>[before]&rarr;[after] !! Description
 
|-
 
|-
| push || - || value || &rarr; value || Pushes a value in the stack
+
| push || - || value || [empty] &rarr; value || Pushes a value in the stack
 
|-
 
|-
| jmp || - || N/A || label &rarr; || Jumps to the label
+
| jmp || - || N/A || label &rarr; [empty] || Jumps to the label
 
|-
 
|-
 
| hlt || - || N/A || || Halts the program
 
| hlt || - || N/A || || Halts the program
  +
|-
  +
| return || - || N/A || PC &rarr; [empty]|| Returns from a subroutine
 
|}
 
|}

Revision as of 17:08, 7 May 2010

Instruction Sets

Mnemonic Opcode
(in hex)
Other operands Stack
[before]→[after]
Description
push - value [empty] → value Pushes a value in the stack
jmp - N/A label → [empty] Jumps to the label
hlt - N/A Halts the program
return - N/A PC → [empty] Returns from a subroutine