-
Notifications
You must be signed in to change notification settings - Fork 0
/
assembly-example.txt
235 lines (213 loc) · 4.62 KB
/
assembly-example.txt
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
0000 BR 848
0008 LD R0, *8(SP)
0016 LD R1, *8(SP)
0024 MUL R0, R0, R1
0032 ST *12(SP), R0
0040 LD R0, *12(SP)
0048 ST *4(SP), R0
0056 BR *0(SP)
0064 BR *0(SP)
0072 LD R0, *12(SP)
0080 LD R1, *16(SP)
0088 ADD R0, R0, R1
0096 ST *20(SP), R0
0104 ST *24(SP), #2
0112 LD R0, *20(SP)
0120 LD R1, *24(SP)
0128 MUL R0, R0, R1
0136 ST *28(SP), R0
0144 ST *32(SP), #5
0152 LD R0, *28(SP)
0160 LD R1, *32(SP)
0168 DIV R0, R0, R1
0176 ST *36(SP), R0
0184 LD R0, *36(SP)
0192 ST *40(SP), R0
0200 ST *44(SP), #0
0208 LD R0, *44(SP)
0216 LD R1, *8(SP)
0224 SUB R0, R0, R1
0232 BGTZ R0, 816
0232 ST *48(SP), #2
0240 LD R0, *40(SP)
0248 LD R1, *48(SP)
0256 DIV R0, R0, R1
0264 ST *52(SP), R0
0272 ADD SP, SP, #56
0280 LD R0, *-4(SP)
0288 ST *8(SP), R0
0296 ST *SP, 312
0304 BR 8
0312 LD R0, *4(SP)
0320 SUB SP, SP, #56
0328 ST *56(SP), R0
0336 LD R0, *40(SP)
0344 LD R1, *56(SP)
0352 MUL R0, R0, R1
0360 ST *60(SP), R0
0368 LD R0, *60(SP)
0376 ST *40(SP), R0
0384 ST *64(SP), #0
0392 LD R0, *64(SP)
0400 LD R1, *8(SP)
0408 SUB R0, R0, R1
0416 BGTZ R0, 784
0416 ST *68(SP), #2
0424 LD R0, *40(SP)
0432 LD R1, *68(SP)
0440 DIV R0, R0, R1
0448 ST *72(SP), R0
0456 ADD SP, SP, #76
0464 LD R0, *-4(SP)
0472 ST *8(SP), R0
0480 ST *SP, 496
0488 BR 8
0496 LD R0, *4(SP)
0504 SUB SP, SP, #76
0512 ST *76(SP), R0
0520 LD R0, *40(SP)
0528 LD R1, *76(SP)
0536 SUB R0, R0, R1
0544 ST *80(SP), R0
0552 LD R0, *80(SP)
0560 ST *40(SP), R0
0568 ST *84(SP), #0
0576 LD R0, *84(SP)
0584 LD R1, *8(SP)
0592 SUB R0, R0, R1
0600 BGTZ R0, 752
0600 LD R0, *12(SP)
0608 LD R1, *16(SP)
0616 DIV R0, R0, R1
0624 ST *88(SP), R0
0632 LD R0, *40(SP)
0640 LD R1, *88(SP)
0648 ADD R0, R0, R1
0656 ST *92(SP), R0
0664 ST *96(SP), #1
0672 LD R0, *92(SP)
0680 LD R1, *96(SP)
0688 ADD R0, R0, R1
0696 ST *100(SP), R0
0704 LD R0, *100(SP)
0712 ST *40(SP), R0
0720 LD R0, *84(SP)
0728 ADD R0, R0, #1
0736 ST *84(SP), R0
0744 BR 576
0752 LD R0, *64(SP)
0760 ADD R0, R0, #1
0768 ST *64(SP), R0
0776 BR 392
0784 LD R0, *44(SP)
0792 ADD R0, R0, #1
0800 ST *44(SP), R0
0808 BR 208
0816 LD R0, *40(SP)
0824 ST *4(SP), R0
0832 BR *0(SP)
0840 BR *0(SP)
0848 ST *8(SP), #"just a random code"
0856 LD R0, *8(SP)
0864 ST *12(SP), R0
0872 ST *16(SP), #3
0880 ST *20(SP), #1
0888 ST *24(SP), #2
0896 ADD SP, SP, #28
0904 LD R0, *-16(SP)
0912 ST *8(SP), R0
0920 LD R0, *-8(SP)
0928 ST *12(SP), R0
0936 LD R0, *-4(SP)
0944 ST *16(SP), R0
0952 ST *SP, 968
0960 BR 72
0968 LD R0, *4(SP)
0976 SUB SP, SP, #28
0984 ST *28(SP), R0
0992 LD R0, *16(SP)
1000 LD R1, *28(SP)
1008 LD R3, #1
1016 XOR R0, R1, R0
1024 BGTZ R0 1040
1032 LD R3, #0
1040 ST *32(SP), R3
1048 ST *36(SP), #3
1056 ST *40(SP), #5
1064 ADD SP, SP, #44
1072 LD R0, *-32(SP)
1080 ST *8(SP), R0
1088 LD R0, *-8(SP)
1096 ST *12(SP), R0
1104 LD R0, *-4(SP)
1112 ST *16(SP), R0
1120 ST *SP, 1136
1128 BR 72
1136 LD R0, *4(SP)
1144 SUB SP, SP, #44
1152 ST *44(SP), R0
1160 ST *48(SP), #3
1168 ST *52(SP), #2
1176 LD R0, *48(SP)
1184 LD R1, *52(SP)
1192 MUL R0, R0, R1
1200 ST *56(SP), R0
1208 ST *60(SP), #7
1216 LD R0, *56(SP)
1224 LD R1, *60(SP)
1232 MUL R0, R0, R1
1240 ST *64(SP), R0
1248 ST *68(SP), #1
1256 ST *72(SP), #2
1264 LD R0, *68(SP)
1272 LD R1, *72(SP)
1280 ADD R0, R0, R1
1288 ST *76(SP), R0
1296 ST *80(SP), #4
1304 LD R0, *76(SP)
1312 LD R1, *80(SP)
1320 DIV R0, R0, R1
1328 ST *84(SP), R0
1336 LD R0, *64(SP)
1344 LD R1, *84(SP)
1352 ADD R0, R0, R1
1360 ST *88(SP), R0
1368 LD R0, *44(SP)
1376 LD R1, *88(SP)
1384 ADD R0, R0, R1
1392 ST *92(SP), R0
1400 ST *96(SP), #5
1408 LD R0, *92(SP)
1416 LD R1, *96(SP)
1424 SUB R0, R0, R1
1432 ST *100(SP), R0
1440 ST *104(SP), #10
1448 ST *108(SP), #5
1456 LD R0, *104(SP)
1464 LD R1, *108(SP)
1472 ADD R0, R0, R1
1480 ST *112(SP), R0
1488 LD R0, *100(SP)
1496 LD R1, *112(SP)
1504 LD R3, #0
1512 SUB R0, R1, R0
1520 BGEZ R0 1536
1528 LD R3, #1
1536 ST *116(SP), R3
1544 LD R0, *32(SP)
1552 LD R1, *116(SP)
1560 LD R0, *-1(SP)
1568 ST *120(SP), R0
1576 ST *124(SP), #1
1584 LD R0, *120(SP)
1592 LD R1, *124(SP)
1600 LD R3, #0
1608 XOR R0, R1, R0
1616 BGTZ R0 1632
1624 LD R3, #1
1632 ST *128(SP), R3
1640 LD R0, *128(SP)
1648 ST *132(SP), R0
1656 BR *0(SP)
1664 halt
1672 halt