-
Notifications
You must be signed in to change notification settings - Fork 1
/
bin2_disasm.txt
477 lines (477 loc) · 9 KB
/
bin2_disasm.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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
bin2
Entries on strings table: 1
Entries on symbols table: 7
Strings: ['\n']
Symbols: ['dictionary', 'nth', 'of', 'n', '-nth', 'cur', 'acc']
Tapes: 3
----------------------------------
Tape id: 0 | Length: 2552
0x0 PUSHI 0x7e
0x9 PUSHI 0x7d
0x12 PUSHI 0x7c
0x1b PUSHI 0x7b
0x24 PUSHI 0x7a
0x2d PUSHI 0x79
0x36 PUSHI 0x78
0x3f PUSHI 0x77
0x48 PUSHI 0x76
0x51 PUSHI 0x75
0x5a PUSHI 0x74
0x63 PUSHI 0x73
0x6c PUSHI 0x72
0x75 PUSHI 0x71
0x7e PUSHI 0x70
0x87 PUSHI 0x6f
0x90 PUSHI 0x6e
0x99 PUSHI 0x6d
0xa2 PUSHI 0x6c
0xab PUSHI 0x6b
0xb4 PUSHI 0x6a
0xbd PUSHI 0x69
0xc6 PUSHI 0x68
0xcf PUSHI 0x67
0xd8 PUSHI 0x66
0xe1 PUSHI 0x65
0xea PUSHI 0x64
0xf3 PUSHI 0x63
0xfc PUSHI 0x62
0x105 PUSHI 0x61
0x10e PUSHI 0x60
0x117 PUSHI 0x5f
0x120 PUSHI 0x5e
0x129 PUSHI 0x5d
0x132 PUSHI 0x5c
0x13b PUSHI 0x5b
0x144 PUSHI 0x5a
0x14d PUSHI 0x59
0x156 PUSHI 0x58
0x15f PUSHI 0x57
0x168 PUSHI 0x56
0x171 PUSHI 0x55
0x17a PUSHI 0x54
0x183 PUSHI 0x53
0x18c PUSHI 0x52
0x195 PUSHI 0x51
0x19e PUSHI 0x50
0x1a7 PUSHI 0x4f
0x1b0 PUSHI 0x4e
0x1b9 PUSHI 0x4d
0x1c2 PUSHI 0x4c
0x1cb PUSHI 0x4b
0x1d4 PUSHI 0x4a
0x1dd PUSHI 0x49
0x1e6 PUSHI 0x48
0x1ef PUSHI 0x47
0x1f8 PUSHI 0x46
0x201 PUSHI 0x45
0x20a PUSHI 0x44
0x213 PUSHI 0x43
0x21c PUSHI 0x42
0x225 PUSHI 0x41
0x22e PUSHI 0x40
0x237 PUSHI 0x3f
0x240 PUSHI 0x3e
0x249 PUSHI 0x3d
0x252 PUSHI 0x3c
0x25b PUSHI 0x3b
0x264 PUSHI 0x3a
0x26d PUSHI 0x39
0x276 PUSHI 0x38
0x27f PUSHI 0x37
0x288 PUSHI 0x36
0x291 PUSHI 0x35
0x29a PUSHI 0x34
0x2a3 PUSHI 0x33
0x2ac PUSHI 0x32
0x2b5 PUSHI 0x31
0x2be PUSHI 0x30
0x2c7 PUSHI 0x2f
0x2d0 PUSHI 0x2e
0x2d9 PUSHI 0x2d
0x2e2 PUSHI 0x2c
0x2eb PUSHI 0x2b
0x2f4 PUSHI 0x2a
0x2fd PUSHI 0x29
0x306 PUSHI 0x28
0x30f PUSHI 0x27
0x318 PUSHI 0x26
0x321 PUSHI 0x25
0x32a PUSHI 0x24
0x333 PUSHI 0x23
0x33c PUSHI 0x22
0x345 PUSHI 0x21
0x34e PUSHI 0x20
0x357 LIST 0x5f ; create a list (size 0x5f)
0x360 DECLARE 0x0
0x369 STORETOP 0x0 ; store list in symbol 0x0
0x372 PUSHUNIT
0x373 DECLARE 0x1 ; declare a variable to symbol index 0x1
0x37c PUSHCLOSURE 0x1 ; push tape 0x1
0x385 STORETOP 0x1 ; store it to symbol 0x1
0x38e PUSHUNIT
0x38f PUSHI 0x2f ; push integer
0x398 PUSHSY 0x0 ; the list
0x3a1 PUSHSY 0x1 ; tape_1
0x3aa CALL ; call tape_1
0x3ab PRINT
0x3ac PUSHSTR 0x0
0x3b5 PRINT
0x3b6 PUSHUNIT
0x3b7 PUSHI 0x2a
0x3c0 PUSHSY 0x0
0x3c9 PUSHSY 0x1
0x3d2 CALL
0x3d3 PRINT
0x3d4 PUSHSTR 0x0
0x3dd PRINT
0x3de PUSHUNIT
0x3df PUSHI 0x39
0x3e8 PUSHSY 0x0
0x3f1 PUSHSY 0x1
0x3fa CALL
0x3fb PRINT
0x3fc PUSHSTR 0x0
0x405 PRINT
0x406 PUSHUNIT
0x407 PUSHI 0x36
0x410 PUSHSY 0x0
0x419 PUSHSY 0x1
0x422 CALL
0x423 PRINT
0x424 PUSHSTR 0x0
0x42d PRINT
0x42e PUSHUNIT
0x42f PUSHI 0x5c
0x438 PUSHSY 0x0
0x441 PUSHSY 0x1
0x44a CALL
0x44b PRINT
0x44c PUSHSTR 0x0
0x455 PRINT
0x456 PUSHUNIT
0x457 PUSHI 0x57
0x460 PUSHSY 0x0
0x469 PUSHSY 0x1
0x472 CALL
0x473 PRINT
0x474 PUSHSTR 0x0
0x47d PRINT
0x47e PUSHUNIT
0x47f PUSHI 0x46
0x488 PUSHSY 0x0
0x491 PUSHSY 0x1
0x49a CALL
0x49b PRINT
0x49c PUSHSTR 0x0
0x4a5 PRINT
0x4a6 PUSHUNIT
0x4a7 PUSHI 0x53
0x4b0 PUSHSY 0x0
0x4b9 PUSHSY 0x1
0x4c2 CALL
0x4c3 PRINT
0x4c4 PUSHSTR 0x0
0x4cd PRINT
0x4ce PUSHUNIT
0x4cf PUSHI 0x5a
0x4d8 PUSHSY 0x0
0x4e1 PUSHSY 0x1
0x4ea CALL
0x4eb PRINT
0x4ec PUSHSTR 0x0
0x4f5 PRINT
0x4f6 PUSHUNIT
0x4f7 PUSHI 0x40
0x500 PUSHSY 0x0
0x509 PUSHSY 0x1
0x512 CALL
0x513 PRINT
0x514 PUSHSTR 0x0
0x51d PRINT
0x51e PUSHUNIT
0x51f PUSHI 0x54
0x528 PUSHSY 0x0
0x531 PUSHSY 0x1
0x53a CALL
0x53b PRINT
0x53c PUSHSTR 0x0
0x545 PRINT
0x546 PUSHUNIT
0x547 PUSHI 0x55
0x550 PUSHSY 0x0
0x559 PUSHSY 0x1
0x562 CALL
0x563 PRINT
0x564 PUSHSTR 0x0
0x56d PRINT
0x56e PUSHUNIT
0x56f PUSHI 0x53
0x578 PUSHSY 0x0
0x581 PUSHSY 0x1
0x58a CALL
0x58b PRINT
0x58c PUSHSTR 0x0
0x595 PRINT
0x596 PUSHUNIT
0x597 PUSHI 0x50
0x5a0 PUSHSY 0x0
0x5a9 PUSHSY 0x1
0x5b2 CALL
0x5b3 PRINT
0x5b4 PUSHSTR 0x0
0x5bd PRINT
0x5be PUSHUNIT
0x5bf PUSHI 0x4f
0x5c8 PUSHSY 0x0
0x5d1 PUSHSY 0x1
0x5da CALL
0x5db PRINT
0x5dc PUSHSTR 0x0
0x5e5 PRINT
0x5e6 PUSHUNIT
0x5e7 PUSHI 0x48
0x5f0 PUSHSY 0x0
0x5f9 PUSHSY 0x1
0x602 CALL
0x603 PRINT
0x604 PUSHSTR 0x0
0x60d PRINT
0x60e PUSHUNIT
0x60f PUSHI 0x4d
0x618 PUSHSY 0x0
0x621 PUSHSY 0x1
0x62a CALL
0x62b PRINT
0x62c PUSHSTR 0x0
0x635 PRINT
0x636 PUSHUNIT
0x637 PUSHI 0x5a
0x640 PUSHSY 0x0
0x649 PUSHSY 0x1
0x652 CALL
0x653 PRINT
0x654 PUSHSTR 0x0
0x65d PRINT
0x65e PUSHUNIT
0x65f PUSHI 0x40
0x668 PUSHSY 0x0
0x671 PUSHSY 0x1
0x67a CALL
0x67b PRINT
0x67c PUSHSTR 0x0
0x685 PRINT
0x686 PUSHUNIT
0x687 PUSHI 0x50
0x690 PUSHSY 0x0
0x699 PUSHSY 0x1
0x6a2 CALL
0x6a3 PRINT
0x6a4 PUSHSTR 0x0
0x6ad PRINT
0x6ae PUSHUNIT
0x6af PUSHI 0x43
0x6b8 PUSHSY 0x0
0x6c1 PUSHSY 0x1
0x6ca CALL
0x6cb PRINT
0x6cc PUSHSTR 0x0
0x6d5 PRINT
0x6d6 PUSHUNIT
0x6d7 PUSHI 0x47
0x6e0 PUSHSY 0x0
0x6e9 PUSHSY 0x1
0x6f2 CALL
0x6f3 PRINT
0x6f4 PUSHSTR 0x0
0x6fd PRINT
0x6fe PUSHUNIT
0x6ff PUSHI 0x56
0x708 PUSHSY 0x0
0x711 PUSHSY 0x1
0x71a CALL
0x71b PRINT
0x71c PUSHSTR 0x0
0x725 PRINT
0x726 PUSHUNIT
0x727 PUSHI 0x54
0x730 PUSHSY 0x0
0x739 PUSHSY 0x1
0x742 CALL
0x743 PRINT
0x744 PUSHSTR 0x0
0x74d PRINT
0x74e PUSHUNIT
0x74f PUSHI 0x44
0x758 PUSHSY 0x0
0x761 PUSHSY 0x1
0x76a CALL
0x76b PRINT
0x76c PUSHSTR 0x0
0x775 PRINT
0x776 PUSHUNIT
0x777 PUSHI 0x42
0x780 PUSHSY 0x0
0x789 PUSHSY 0x1
0x792 CALL
0x793 PRINT
0x794 PUSHSTR 0x0
0x79d PRINT
0x79e PUSHUNIT
0x79f PUSHI 0x55
0x7a8 PUSHSY 0x0
0x7b1 PUSHSY 0x1
0x7ba CALL
0x7bb PRINT
0x7bc PUSHSTR 0x0
0x7c5 PRINT
0x7c6 PUSHUNIT
0x7c7 PUSHI 0x46
0x7d0 PUSHSY 0x0
0x7d9 PUSHSY 0x1
0x7e2 CALL
0x7e3 PRINT
0x7e4 PUSHSTR 0x0
0x7ed PRINT
0x7ee PUSHUNIT
0x7ef PUSHI 0x45
0x7f8 PUSHSY 0x0
0x801 PUSHSY 0x1
0x80a CALL
0x80b PRINT
0x80c PUSHSTR 0x0
0x815 PRINT
0x816 PUSHUNIT
0x817 PUSHI 0x40
0x820 PUSHSY 0x0
0x829 PUSHSY 0x1
0x832 CALL
0x833 PRINT
0x834 PUSHSTR 0x0
0x83d PRINT
0x83e PUSHUNIT
0x83f PUSHI 0x55
0x848 PUSHSY 0x0
0x851 PUSHSY 0x1
0x85a CALL
0x85b PRINT
0x85c PUSHSTR 0x0
0x865 PRINT
0x866 PUSHUNIT
0x867 PUSHI 0x49
0x870 PUSHSY 0x0
0x879 PUSHSY 0x1
0x882 CALL
0x883 PRINT
0x884 PUSHSTR 0x0
0x88d PRINT
0x88e PUSHUNIT
0x88f PUSHI 0x4a
0x898 PUSHSY 0x0
0x8a1 PUSHSY 0x1
0x8aa CALL
0x8ab PRINT
0x8ac PUSHSTR 0x0
0x8b5 PRINT
0x8b6 PUSHUNIT
0x8b7 PUSHI 0x54
0x8c0 PUSHSY 0x0
0x8c9 PUSHSY 0x1
0x8d2 CALL
0x8d3 PRINT
0x8d4 PUSHSTR 0x0
0x8dd PRINT
0x8de PUSHUNIT
0x8df PUSHI 0x40
0x8e8 PUSHSY 0x0
0x8f1 PUSHSY 0x1
0x8fa CALL
0x8fb PRINT
0x8fc PUSHSTR 0x0
0x905 PRINT
0x906 PUSHUNIT
0x907 PUSHI 0x58
0x910 PUSHSY 0x0
0x919 PUSHSY 0x1
0x922 CALL
0x923 PRINT
0x924 PUSHSTR 0x0
0x92d PRINT
0x92e PUSHUNIT
0x92f PUSHI 0x42
0x938 PUSHSY 0x0
0x941 PUSHSY 0x1
0x94a CALL
0x94b PRINT
0x94c PUSHSTR 0x0
0x955 PRINT
0x956 PUSHUNIT
0x957 PUSHI 0x54
0x960 PUSHSY 0x0
0x969 PUSHSY 0x1
0x972 CALL
0x973 PRINT
0x974 PUSHSTR 0x0
0x97d PRINT
0x97e PUSHUNIT
0x97f PUSHI 0x2
0x988 PUSHSY 0x0
0x991 PUSHSY 0x1
0x99a CALL
0x99b PRINT
0x99c PUSHSTR 0x0
0x9a5 PRINT
0x9a6 PUSHUNIT
0x9a7 PUSHI 0x2
0x9b0 PUSHSY 0x0
0x9b9 PUSHSY 0x1
0x9c2 CALL
0x9c3 PRINT
0x9c4 PUSHSTR 0x0
0x9cd PRINT
0x9ce PUSHUNIT
0x9cf PUSHI 0x5e ; integer
0x9d8 PUSHSY 0x0 ; list
0x9e1 PUSHSY 0x1 ; tape_1
0x9ea CALL ; call tape_1
0x9eb PRINT
0x9ec PUSHSTR 0x0
0x9f5 PRINT
0x9f6 PUSHUNIT
0x9f7 HLT
----------------------------------
Tape id: 1 | Length: 94
0x0 DECLARE 0x2 ; declare a variable to symbol index 0x2
0x9 STORE 0x2 ; store arg1 to symbol 0x2
0x12 DECLARE 0x3 ; declare a variable to symbol index 0x3
0x1b STORE 0x3 ; store arg2 to symbol 0x3 (integer)
0x24 NEWENV ; activate new environment
0x25 DECLARE 0x4 ; declare a variable to symbol index 0x4
0x2e PUSHCLOSURE 0x2 ; push id of tape_2
0x37 STORE 0x4 ; store id of tape_2
0x40 PUSHSY 0x2 ; push symbol 0x2 (arg1, list)
0x49 PUSHI 0x1 ; push integer 0x1
0x52 PUSHSY 0x4 ; push id of tape_2
0x5b CALL ; call tape_2
0x5c DEPARTENV ; depart to parent environment
0x5d RET
----------------------------------
Tape id: 2 | Length: 123
0x0 DECLARE 0x5
0x9 STORE 0x5 ; store arg1 to symbol 0x5, counter
0x12 DECLARE 0x6
0x1b STORE 0x6 ; store arg to symbol 0x6 (list)
0x24 PUSHSY 0x5 : arg1 (counter)
0x2d PUSHSY 0x3 ; arg2 of tape_1 (integer)
0x36 EQ
0x37 JF 0x53 ; jump if not equal
0x40 PUSHSY 0x6
0x49 HEAD ; pops a list and pushes its first element
0x4a JMP 0x7a ; jump to ret
0x53 PUSHSY 0x6
0x5c TAIL ; pops a list and pushes it without its first element
0x5d PUSHI 0x1 ; push integer 0x1
0x66 PUSHSY 0x5 ; counter
0x6f ADD ; +1
0x70 PUSHSY 0x4 ; push id of tape_2
0x79 CALL ; recursive call
0x7a RET