Assembly
Instructions
Int32
Constants
Stack Operations
dup: duplicateget [n:int]: get the nth element- if
n is non-negative, count from the bottom of the stack - if
n is negative, count from the top of the stack
set [n:int]: set the nth element- if n is non-negative, count from the bottom of the stack
- if n is negative, count from the top of the stack
drop
Bitwise Operations
not: bitwise notand: bitwise andor: bitwise orxor: bitwise xorshl: shift leftshr_u: shift right (unsigned)shr_s: shift left (signed)
Arithmetic Operations
add: addsub: subtractmul10: multiply 10, but faster than mulmul: multiply
Comparison Operations
eqz: equal to 0nez: not equal to 0eq: equal tolt_s: less than (signed)le_s: less than or equal to (signed)lt_u: less than (unsigned)le_u: less than or equal to (unsigned)gt_s: greater than (signed)ge_s: greater than or equal to (signed)gt_u: greater than (unsigned)ge_u: greater than or equal to (unsigned)
Control Instructions
jump [l:label]: jump to ljz [l:label]: jump if zerojnz [l:label]: jump if not zerojeq [l:label]: jump if equal