forked from jserv/full-stack-hello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opcode.def
24 lines (24 loc) · 1.03 KB
/
opcode.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name, opcode, has_op1, has_op2, has_result
halt, 0, 0, 0, 0
add, 1, 1, 1, 1
sub, 2, 1, 1, 1
mul, 11, 1, 1, 1
div, 12, 1, 1, 1
mod, 13, 1, 1, 1
and, 16, 1, 1, 1
or, 17, 1, 1, 1
not, 18, 1, 1, 0
xor, 19, 1, 1, 1
lsl, 20, 1, 1, 1
lsr, 21, 1, 1, 1
asr, 22, 1, 1, 1
print, 3, 1, 0, 0
jlt, 4, 1, 1, 0
jle, 5, 1, 1, 0
jz, 6, 1, 1, 0
jge, 7, 1, 1, 0
jgt, 8, 1, 1, 0
jnz, 9, 1, 1, 0
jmp, 10, 1, 0, 0
call, 14, 1, 0, 0
ret, 15, 0, 0, 0