-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmachine_code
More file actions
102 lines (102 loc) · 6.07 KB
/
machine_code
File metadata and controls
102 lines (102 loc) · 6.07 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
[{"index": 0, "opcode": "LD_LITERAL", "arg1": "r4", "arg2": 0},
{"index": 1, "opcode": "PUSH", "arg1": "r4", "arg2": 0},
{"index": 2, "opcode": "LD_LITERAL", "arg1": "r9", "arg2": 1},
{"index": 3, "opcode": "ST_STACK", "arg1": "r9", "arg2": 0},
{"index": 4, "opcode": "LD_LITERAL", "arg1": "r5", "arg2": 0},
{"index": 5, "opcode": "PUSH", "arg1": "r5", "arg2": 0},
{"index": 6, "opcode": "LD_LITERAL", "arg1": "r9", "arg2": 2},
{"index": 7, "opcode": "ST_STACK", "arg1": "r9", "arg2": 1},
{"index": 8, "opcode": "LD_LITERAL", "arg1": "r6", "arg2": 0},
{"index": 9, "opcode": "PUSH", "arg1": "r6", "arg2": 0},
{"index": 10, "opcode": "LD_STACK", "arg1": "r7", "arg2": 1},
{"index": 11, "opcode": "MV", "arg1": "r7", "arg2": "r9"},
{"index": 12, "opcode": "ST_STACK", "arg1": "r9", "arg2": 2},
{"index": 13, "opcode": "LD_LITERAL", "arg1": "r8", "arg2": 0},
{"index": 14, "opcode": "PUSH", "arg1": "r8", "arg2": 0},
{"index": 15, "opcode": "LD_LITERAL", "arg1": "r9", "arg2": 4000000},
{"index": 16, "opcode": "ST_STACK", "arg1": "r9", "arg2": 3},
{"index": 17, "opcode": "LD_STACK", "arg1": "r3", "arg2": 0},
{"index": 18, "opcode": "MV", "arg1": "r3", "arg2": "r9"},
{"index": 19, "opcode": "PUSH", "arg1": "r9", "arg2": 0},
{"index": 20, "opcode": "LD_STACK", "arg1": "r4", "arg2": 1},
{"index": 21, "opcode": "MV", "arg1": "r4", "arg2": "r10"},
{"index": 22, "opcode": "PUSH", "arg1": "r10", "arg2": 0},
{"index": 23, "opcode": "POP", "arg1": "r10", "arg2": 0},
{"index": 24, "opcode": "POP", "arg1": "r9", "arg2": 0},
{"index": 25, "opcode": "ADD", "arg1": "r9", "arg2": "r10"},
{"index": 26, "opcode": "PUSH", "arg1": "r9", "arg2": 0},
{"index": 27, "opcode": "POP", "arg1": "r9", "arg2": 0},
{"index": 28, "opcode": "MV", "arg1": "r9", "arg2": "r12"},
{"index": 29, "opcode": "LD_STACK", "arg1": "r9", "arg2": 3},
{"index": 30, "opcode": "CMP", "arg1": "r12", "arg2": "r9"},
{"index": 31, "opcode": "JGE", "arg1": 77, "arg2": 0},
{"index": 32, "opcode": "LD_LITERAL", "arg1": "r5", "arg2": 0},
{"index": 33, "opcode": "PUSH", "arg1": "r5", "arg2": 0},
{"index": 34, "opcode": "MV", "arg1": "r3", "arg2": "r9"},
{"index": 35, "opcode": "PUSH", "arg1": "r9", "arg2": 0},
{"index": 36, "opcode": "MV", "arg1": "r4", "arg2": "r10"},
{"index": 37, "opcode": "PUSH", "arg1": "r10", "arg2": 0},
{"index": 38, "opcode": "POP", "arg1": "r10", "arg2": 0},
{"index": 39, "opcode": "POP", "arg1": "r9", "arg2": 0},
{"index": 40, "opcode": "ADD", "arg1": "r9", "arg2": "r10"},
{"index": 41, "opcode": "PUSH", "arg1": "r9", "arg2": 0},
{"index": 42, "opcode": "POP", "arg1": "r9", "arg2": 0},
{"index": 43, "opcode": "ST_STACK", "arg1": "r9", "arg2": 4},
{"index": 44, "opcode": "LD_STACK", "arg1": "r6", "arg2": 4},
{"index": 45, "opcode": "MV", "arg1": "r6", "arg2": "r9"},
{"index": 46, "opcode": "PUSH", "arg1": "r9", "arg2": 0},
{"index": 47, "opcode": "LD_LITERAL", "arg1": "r10", "arg2": 2},
{"index": 48, "opcode": "PUSH", "arg1": "r10", "arg2": 0},
{"index": 49, "opcode": "POP", "arg1": "r10", "arg2": 0},
{"index": 50, "opcode": "POP", "arg1": "r9", "arg2": 0},
{"index": 51, "opcode": "MOD", "arg1": "r9", "arg2": "r10"},
{"index": 52, "opcode": "PUSH", "arg1": "r9", "arg2": 0},
{"index": 53, "opcode": "POP", "arg1": "r9", "arg2": 0},
{"index": 54, "opcode": "MV", "arg1": "r9", "arg2": "r12"},
{"index": 55, "opcode": "LD_LITERAL", "arg1": "r9", "arg2": 0},
{"index": 56, "opcode": "CMP", "arg1": "r12", "arg2": "r9"},
{"index": 57, "opcode": "JNE", "arg1": 70, "arg2": 0},
{"index": 58, "opcode": "LD_STACK", "arg1": "r7", "arg2": 2},
{"index": 59, "opcode": "MV", "arg1": "r7", "arg2": "r9"},
{"index": 60, "opcode": "PUSH", "arg1": "r9", "arg2": 0},
{"index": 61, "opcode": "MV", "arg1": "r6", "arg2": "r10"},
{"index": 62, "opcode": "PUSH", "arg1": "r10", "arg2": 0},
{"index": 63, "opcode": "POP", "arg1": "r10", "arg2": 0},
{"index": 64, "opcode": "POP", "arg1": "r9", "arg2": 0},
{"index": 65, "opcode": "ADD", "arg1": "r9", "arg2": "r10"},
{"index": 66, "opcode": "PUSH", "arg1": "r9", "arg2": 0},
{"index": 67, "opcode": "POP", "arg1": "r9", "arg2": 0},
{"index": 68, "opcode": "ST_STACK", "arg1": "r9", "arg2": 2},
{"index": 69, "opcode": "LD_LITERAL", "arg1": "r14", "arg2": 2042},
{"index": 70, "opcode": "LD_STACK", "arg1": "r8", "arg2": 1},
{"index": 71, "opcode": "MV", "arg1": "r8", "arg2": "r9"},
{"index": 72, "opcode": "ST_STACK", "arg1": "r9", "arg2": 0},
{"index": 73, "opcode": "LD_STACK", "arg1": "r3", "arg2": 4},
{"index": 74, "opcode": "MV", "arg1": "r3", "arg2": "r9"},
{"index": 75, "opcode": "ST_STACK", "arg1": "r9", "arg2": 1},
{"index": 76, "opcode": "JMP", "arg1": 17, "arg2": 0},
{"index": 77, "opcode": "LD_LITERAL", "arg1": "r14", "arg2": 2043},
{"index": 78, "opcode": "LD_STACK", "arg1": "r4", "arg2": 2},
{"index": 79, "opcode": "MV", "arg1": "r4", "arg2": "r9"},
{"index": 80, "opcode": "PUSH", "arg1": "r11", "arg2": 0},
{"index": 81, "opcode": "LD_LITERAL", "arg1": "r11", "arg2": 1},
{"index": 82, "opcode": "LD_LITERAL", "arg1": "r10", "arg2": 10},
{"index": 83, "opcode": "MV", "arg1": "r9", "arg2": "r8"},
{"index": 84, "opcode": "MOD", "arg1": "r8", "arg2": "r10"},
{"index": 85, "opcode": "DIV", "arg1": "r9", "arg2": "r10"},
{"index": 86, "opcode": "MV", "arg1": "r8", "arg2": "r10"},
{"index": 87, "opcode": "ADD_LITERAL", "arg1": "r10", "arg2": 48},
{"index": 88, "opcode": "CMP", "arg1": "r9", "arg2": "r0"},
{"index": 89, "opcode": "JE", "arg1": 93, "arg2": 0},
{"index": 90, "opcode": "INC", "arg1": "r11", "arg2": 0},
{"index": 91, "opcode": "PUSH", "arg1": "r10", "arg2": 0},
{"index": 92, "opcode": "JMP", "arg1": 82, "arg2": 0},
{"index": 93, "opcode": "PUSH", "arg1": "r10", "arg2": 0},
{"index": 94, "opcode": "CMP", "arg1": "r11", "arg2": "r0"},
{"index": 95, "opcode": "JE", "arg1": 100, "arg2": 0},
{"index": 96, "opcode": "POP", "arg1": "r10", "arg2": 0},
{"index": 97, "opcode": "PRINT", "arg1": "r10", "arg2": 0},
{"index": 98, "opcode": "DEC", "arg1": "r11", "arg2": 0},
{"index": 99, "opcode": "JMP", "arg1": 94, "arg2": 0},
{"index": 100, "opcode": "POP", "arg1": "r11", "arg2": 0},
{"index": 101, "opcode": "HALT", "arg1": 0, "arg2": 0}]