-
Notifications
You must be signed in to change notification settings - Fork 0
/
mytest.out
218 lines (216 loc) · 2.73 KB
/
mytest.out
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
;IR code
;STOREI 1 $T1
;STOREI $T1 a
;STOREI 2 $T2
;STOREI $T2 b
;STOREI 10 $T3
;STOREI $T3 c
;STOREI 20 $T4
;STOREI $T4 d
;WRITEI a
;WRITEI b
;WRITEI c
;WRITEI d
;ADDI a b $T5
;STOREI $T5 a
;WRITEI a
;MULTI a c $T6
;STOREI $T6 b
;WRITEI b
;STOREI 0 $T7
;SUBI $T7 a $T8
;ADDI $T8 b $T9
;STOREI $T9 c
;WRITEI c
;STOREI 0 $T10
;SUBI $T10 d $T11
;STOREI $T11 d
;WRITEI d
;ADDI a b $T12
;ADDI d c $T13
;MULTI $T12 $T13 $T14
;ADDI a b $T15
;ADDI $T15 c $T16
;ADDI $T16 d $T17
;DIVI $T17 a $T18
;SUBI $T14 $T18 $T19
;STOREI $T19 a
;WRITEI a
;STOREI 10 $T20
;ADDI a $T20 $T21
;STOREI $T21 a
;WRITEI a
;ADDI b a $T22
;STOREI 10 $T23
;ADDI $T22 $T23 $T24
;STOREI $T24 b
;WRITEI b
;STOREI 0 $T25
;STOREI 10 $T26
;SUBI $T25 $T26 $T27
;STOREI $T27 c
;WRITEI c
;STOREF 1.0 $T28
;STOREF $T28 x
;STOREF 2.0 $T29
;STOREF $T29 y
;STOREF 3.14159 $T30
;STOREF $T30 z
;WRITEF x
;WRITEF z
;WRITEF y
;STOREF 2.0 $T31
;DIVF z $T31 $T32
;STOREF $T32 x
;DIVF z y $T33
;STOREF $T33 y
;WRITEF x
;WRITEF y
;ADDF x y $T34
;ADDF $T34 z $T35
;DIVF $T35 z $T36
;STOREF $T36 t
;WRITEF t
;MULTF t t $T37
;STOREF $T37 t
;WRITEF t
;ADDF t z $T38
;ADDF $T38 t $T39
;STOREF 2.0 $T40
;DIVF t $T40 $T41
;ADDF $T39 $T41 $T42
;STOREF 4.0 $T43
;DIVF z $T43 $T44
;ADDF $T42 $T44 $T45
;STOREF 5.0 $T46
;DIVF z $T46 $T47
;ADDF $T45 $T47 $T48
;STOREF 6.0 $T49
;DIVF z $T49 $T50
;ADDF $T48 $T50 $T51
;STOREF 7.0 $T52
;DIVF z $T52 $T53
;ADDF $T51 $T53 $T54
;STOREF $T54 t
;WRITEF t
;tiny code
var a
var b
var c
var d
var x
var y
var z
var t
move 1 r0
move r0 a
move 2 r1
move r1 b
move 10 r2
move r2 c
move 20 r3
move r3 d
sys writei a
sys writei b
sys writei c
sys writei d
move a r4
addi b r4
move r4 a
sys writei a
move a r5
muli c r5
move r5 b
sys writei b
move 0 r6
subi a r6
addi b r6
move r6 c
sys writei c
move 0 r7
subi d r7
move r7 d
sys writei d
move a r8
addi b r8
move d r9
addi c r9
muli r9 r8
move a r10
addi b r10
addi c r10
addi d r10
divi a r10
subi r10 r8
move r8 a
sys writei a
move 10 r11
move a r12
addi r11 r12
move r12 a
sys writei a
move b r13
addi a r13
move 10 r14
addi r14 r13
move r13 b
sys writei b
move 0 r15
move 10 r16
subi r16 r15
move r15 c
sys writei c
move 1.0 r17
move r17 x
move 2.0 r18
move r18 y
move 3.14159 r19
move r19 z
sys writer x
sys writer z
sys writer y
move 2.0 r20
move z r21
divr r20 r21
move r21 x
move z r22
divr y r22
move r22 y
sys writer x
sys writer y
move x r23
addr y r23
addr z r23
divr z r23
move r23 t
sys writer t
move t r24
mulr t r24
move r24 t
sys writer t
move t r25
addr z r25
addr t r25
move 2.0 r26
move t r27
divr r26 r27
addr r27 r25
move 4.0 r28
move z r29
divr r28 r29
addr r29 r25
move 5.0 r30
move z r31
divr r30 r31
addr r31 r25
move 6.0 r32
move z r33
divr r32 r33
addr r33 r25
move 7.0 r34
move z r35
divr r34 r35
addr r35 r25
move r25 t
sys writer t
sys halt