-
Notifications
You must be signed in to change notification settings - Fork 0
/
test6.ass
241 lines (241 loc) · 2.19 KB
/
test6.ass
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
235
236
237
238
239
240
241
XOR R0,R0,R0
DATA 102
DATA 97
DATA 108
DATA 115
DATA 101
DATA 0
DATA 0
DATA 0
DATA 116
DATA 114
DATA 117
DATA 101
DATA 0
DATA 0
DATA 0
DATA 0
ADDI R1,R0,1
BEQZ R1,L0
WRS 8
JMP L1
L0:
WRS 0
L1:
ADDI R2,R0,0
BEQZ R2,L2
WRS 8
JMP L3
L2:
WRS 0
L3:
ADDI R3,R0,1
BEQZ R3,L4
ADDI R4,R0,0
JMP L5
L4:
ADDI R4,R0,1
L5:
BEQZ R4,L6
WRS 8
JMP L7
L6:
WRS 0
L7:
ADDI R5,R0,0
BEQZ R5,L8
ADDI R6,R0,0
JMP L9
L8:
ADDI R6,R0,1
L9:
BEQZ R6,L10
WRS 8
JMP L11
L10:
WRS 0
L11:
ADDI R7,R0,1
ADDI R8,R0,1
MUL R10,R8,R7
BNEZ R10,L12
ADDI R9,R0,0
JMP L13
L12:
ADDI R9,R0,1
L13:
BEQZ R9,L14
WRS 8
JMP L15
L14:
WRS 0
L15:
ADDI R11,R0,1
ADDI R12,R0,0
MUL R14,R12,R11
BNEZ R14,L16
ADDI R13,R0,0
JMP L17
L16:
ADDI R13,R0,1
L17:
BEQZ R13,L18
WRS 8
JMP L19
L18:
WRS 0
L19:
ADDI R15,R0,0
ADDI R16,R0,1
MUL R18,R16,R15
BNEZ R18,L20
ADDI R17,R0,0
JMP L21
L20:
ADDI R17,R0,1
L21:
BEQZ R17,L22
WRS 8
JMP L23
L22:
WRS 0
L23:
ADDI R19,R0,0
ADDI R20,R0,0
MUL R22,R20,R19
BNEZ R22,L24
ADDI R21,R0,0
JMP L25
L24:
ADDI R21,R0,1
L25:
BEQZ R21,L26
WRS 8
JMP L27
L26:
WRS 0
L27:
ADDI R23,R0,1
BEQZ R23,L28
ADDI R24,R0,0
JMP L29
L28:
ADDI R24,R0,1
L29:
BEQZ R24,L30
ADDI R25,R0,0
JMP L31
L30:
ADDI R25,R0,1
L31:
BEQZ R25,L32
WRS 8
JMP L33
L32:
WRS 0
L33:
ADDI R26,R0,1
ADDI R27,R0,1
BEQZ R27,L34
ADDI R28,R0,0
JMP L35
L34:
ADDI R28,R0,1
L35:
MUL R30,R28,R26
BNEZ R30,L36
ADDI R29,R0,0
JMP L37
L36:
ADDI R29,R0,1
L37:
BEQZ R29,L38
WRS 8
JMP L39
L38:
WRS 0
L39:
ADDI R31,R0,1
BEQZ R31,L40
ADDI R32,R0,0
JMP L41
L40:
ADDI R32,R0,1
L41:
ADDI R33,R0,1
MUL R35,R33,R32
BNEZ R35,L42
ADDI R34,R0,0
JMP L43
L42:
ADDI R34,R0,1
L43:
BEQZ R34,L44
WRS 8
JMP L45
L44:
WRS 0
L45:
ADDI R36,R0,1
ADDI R37,R0,1
MUL R39,R37,R36
BNEZ R39,L46
ADDI R38,R0,0
JMP L47
L46:
ADDI R38,R0,1
L47:
BEQZ R38,L48
ADDI R40,R0,0
JMP L49
L48:
ADDI R40,R0,1
L49:
BEQZ R40,L50
WRS 8
JMP L51
L50:
WRS 0
L51:
ADDI R41,R0,1
BEQZ R41,L52
ADDI R42,R0,0
JMP L53
L52:
ADDI R42,R0,1
L53:
ADDI R43,R0,1
ADDI R44,R0,1
BEQZ R44,L54
ADDI R45,R0,0
JMP L55
L54:
ADDI R45,R0,1
L55:
MUL R47,R45,R43
BNEZ R47,L56
ADDI R46,R0,0
JMP L57
L56:
ADDI R46,R0,1
L57:
BEQZ R46,L58
ADDI R48,R0,0
JMP L59
L58:
ADDI R48,R0,1
L59:
MUL R50,R48,R42
BNEZ R50,L60
ADDI R49,R0,0
JMP L61
L60:
ADDI R49,R0,1
L61:
BEQZ R49,L62
WRS 8
JMP L63
L62:
WRS 0
L63:
HALT