Instruction listing
Addy edited this page Oct 16, 2021
·
4 revisions
Note: all of the instructions listed below are lowercase because they're written like so in customasm, which is a case-sensitive assembler.
D
= destination
S
= source
L
= label
A
/B
= compared values
When an operand starts with %
it becomes a pointer. E.g: in the instruction mov D, %S
, %S
will point to the specified memory address. The destination operand always points to a memory location, but can also point to another pointer (&memory[memory[XX]]
).
-
nop
- do nothing -
ext
,ret
- exit/return from the current scope -
call L
- call the label; jump to the label temporarily -
int S
- call a software interruption,S
is the interruption code -
jmp L
- jump to the destination label -
jeq L
- jump to the destination label if the comparison is equal -
jnq L
- ... is not equal -
jhi L
- ...A
is higher thanB
-
jlw L
- ...A
is lower thanB
-
jhe L
- ...A
is higher or equal toB
-
jle L
- ...A
is lower or equal toB
-
mov D, S
- move/copyS
toD
-
add D, S
- addS
toD
-
sub D, S
- subtractS
fromD
-
mul D, S
- multiplyS
withD
-
div D, S
- divideS
byD
-
or D, S
- binary ORD
withS
-
xor D, S
- binary eXclusive ORD
withS
-
and D, S
- binary ANDD
withS
-
not D, S
- binary NOTD
withS
-
shl D, S
- left shift bits fromD
byS
times -
shr D, S
- right shift bits fromD
withS
times -
cmp D, S
- compareD
toS