-
Notifications
You must be signed in to change notification settings - Fork 0
/
instructions.py
41 lines (34 loc) · 1.02 KB
/
instructions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
op = {
"HLT": 0b0000000000000001,
"PRN": 0b0000000001000111,
"PRA": 0b0000000001001000,
"AND": 0b0000000010101000,
"OR": 0b0000000010101010,
"XOR": 0b0000000010101011,
"NOT": 0b0000000000000000,
"CMP": 0b0000000010100111,
"ADD": 0b0000000010100000,
"SUB": 0b0000000010100001,
"DIV": 0b0000000010100011,
"MUL": 0b0000000010100010,
"INC": 0b0000000001100101,
"DEC": 0b0000000001100110,
"LDI": 0b0000000010000010,
"LD": 0b0000000010000011,
"PUSH": 0b0000000001000101,
"POP": 0b0000000001000110,
"ST": 0b0000000010000100,
"SHL": 0b0000000000000000,
"SHR": 0b0000000000000000,
"CALL": 0b0000000001010000,
"RET": 0b0000000000010001,
"JMP": 0b0000000001010100,
"JEQ": 0b0000000001010101,
"JLT": 0b0000000001011000,
"JLE": 0b0000000001011001,
"JGT": 0b0000000000000000,
"JGE": 0b0000000000000000,
"JNE": 0b0000000001010110,
"INT": 0b0000000000000000,
"IRET": 0b0000000000010011
}