Mneumonic Operand 1 Operand 2 Description
movReg Any Sets op1 = op2
castReg Any Sets op1 = op2, casting
bcastInteger Reg Reg Bit / Reinterpret cast
absNumeric Signed Numeric Gets positive value
nopDoes nothing
dbgReg Prints the value and register for debugging
Mneumonic Operand 1 Operand 2 Operand 3 Description
addNumeric Reg Numeric Numeric op1 = op2 + op3
subNumeric Reg Numeric Numeric op1 = op2 - op3
mulNumeric Reg Numeric Numeric op1 = op2 * op3
divNumeric Reg Numeric Numeric op1 = op2 / op3
modNumeric Reg Numeric Numeric op1 = op2 mod op3
Mneumonic Operand 1 Operand 2 Description
jmpLabel Unconditional jump to the given label
jalLabel Instr Reg Jumps to the given label, setting the instruction register to the next instruction
bzLabel Numeric Jump to label if op2 is zero
bnzLabel Numeric Jump to label if op2 is not zero
Comparison operations take an unsigned destination register (minimum width 1),
and sets the destination to 1 if true, otherwise sets to 0.
Comparisons are only allowed between the same register sets.
Mneumonic Operand 1 Operand 2 Operand 3 Description
eqUnsigned Reg Numeric Numeric \(op2 = op3\)
gtUnsigned Reg Numeric Numeric \(op2 \gt op1\)
gteUnsigned Reg Numeric Numeric \(op2 \ge op3\)
ltUnsigned Reg Numeric Numeric \(op2 \lt op3\)
lteUnsigned Reg Numeric Numeric \(op2 \le op3\)
All (signed and unsigned) integers are defined to be stored in twos-complement representation.
The following bitwise operations work only between integer types.
Mneumonic Operand 1 Operand 2 Operand 3 Description
andInteger Reg Integer Integer Bitwise AND
orInteger Reg Integer Integer Bitwise OR
xorInteger Reg Integer Integer Bitwise XOR
notInteger Reg Integer Integer Bitwise NOT
Blocks of memory can be allocated with the alloc instruction.
Mneumonic Operand 1 Operand 2 Description
allocAddress Reg Unsigned Allocates a continguous block of memory X bytes long
freeAddress Reg De-allocates a block of memory
loadReg Address Reg Loads the given register from the address
storeAddress Reg Any Stores a value into the address
msizeUnsigned Reg Sets op1 to the size of a memory address in bytes
isizeUnsigned Reg Sets op1 to the size of a instruction address in bytes