ADD dest, *ops
Sum operands amd save into dest
- ADD A, B
A = A + B
- ADD A, B, C, D
A = ((B + C) + D)
- dest:
Address | IndirectAddress | Register
- ops:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
SUB dest, *ops
Subtract operands amd save into dest.
- SUB A, B
A = A - B
- SUB A, B, C, D
A = ((B - C) - D)
- dest:
Address | IndirectAddress | Register
- ops:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
MUL dest, *ops
Multiply operands amd save into dest
- MUL A, B
A = A * B
- MUL A, B, C, D
A = ((B * C) * D)
- dest:
Address | IndirectAddress | Register
- ops:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
DIV dest, *ops
Divide (floor) operands amd save into dest.
- DIV A, B
A = A / B
- DIV A, B, C, D
A = ((B / C) / D)
Can raise ALUDZeroDivisionError
- dest:
Address | IndirectAddress | Register
- ops:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
MOD dest, *ops
Modulo divide operands amd save into dest.
- MOD A, B
A = A % B
- MOD A, B, C, D
A = ((B % C) % D)
Can raise ALUDZeroDivisionError
- dest:
Address | IndirectAddress | Register
- ops:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
XOR dest, *ops
Apply logical XOR to operands amd save into dest
- XOR A, B
A = A ^ B
- XOR A, B, C, D
A = ((B ^ C) ^ D)
- dest:
Address | IndirectAddress | Register
- ops:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
AND dest, *ops
Apply logical AND to operands amd save into dest
- AND A, B
A = A & B
- AND A, B, C, D
A = ((B & C) & D)
- dest:
Address | IndirectAddress | Register
- ops:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
OR dest, *ops
Apply logical OR to operands amd save into dest
- OR A, B
A = A | B
- OR A, B, C, D
A = ((B | C) | D)
- dest:
Address | IndirectAddress | Register
- ops:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
DEC dest
Decrement (-1) operand
- dest:
Address | IndirectAddress | Register
- return:
typing.Iterator
INC dest
Increment (+1) operand
- dest:
Address | IndirectAddress | Register
- return:
typing.Iterator
JMP label
Jump to label without condition
- label:
Label
- return:
None
JE label
Jump to label if Z Flag is set (operands are equal)
- label:
Label
- return:
None
JE label
Jump to label if Z Flag is not set (operands are not equal)
- label:
Label
- return:
None
JL label
Jump to label if N Flag is set (first < second)
- label:
Label
- return:
None
JL label
Jump to label if N Flag is not set (first > second)
- label:
Label
- return:
None
JLE label
Jump to label if Z or N flag is set (first <= second)
- label:
Label
- return:
None
JGE label
Jump to label if Z or not N flag is set (first >= second)
- label:
Label
- return:
None
MOV dest, src
Move value from src to dest
- dest:
Address | IndirectAddress | Register
- src:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
MOVN dest, src
Move number value from src to #STDOUT or #STDERR
- dest:
Address
- src:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
LDN dest, src
Get number value from #STDIN and write into dest
- dest:
Address
- src:
Address | IndirectAddress | Register | Constant
- return:
typing.Iterator
CMP op1, op2
Compare two operands by subtracting and set flags
- var:
Address | IndirectAddress | Register | Constant
- src:
Address | IndirectAddress | Register | Constant
- return:
None