-
Notifications
You must be signed in to change notification settings - Fork 0
/
factorial.insts
32 lines (32 loc) · 1.46 KB
/
factorial.insts
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
(1, ' \t\t\n', 'Push stack (-0x1)')
(1, ' \t\t\n', 'Push stack (-0x1)')
(1, ' \n', 'Push stack (0x0)')
(17, '\t\n\t\t', 'Read to heap (addressed by stack top) [Number]')
(1, ' \n', 'Push stack (0x0)')
(13, '\t\t\t', 'Retrieve')
(2, ' \n ', 'Duplicate stack top')
(22, '\n\t \t\t\t\t\t \t\t\n', 'Jump to the label if stack top is negative <0xfb>')
(2, ' \n ', 'Duplicate stack top')
(22, '\n\t\t\t\t\t\t\t \t \n', 'Jump to the label if stack top is negative <0x1fa>')
(18, '\n \t\t\t\t\t\t\t\t\n', 'Set a label <0xff>')
(2, ' \n ', 'Duplicate stack top')
(1, ' \t\n', 'Push stack (0x1)')
(8, '\t \t', 'Subtract')
(2, ' \n ', 'Duplicate stack top')
(22, '\n\t \t\t\t\t\t\t\t \n', 'Jump to the label if stack top is negative <0xfe>')
(20, '\n \n\t\t\t\t\t\t\t\t\n', 'Jump to the label unconditionally <0xff>')
(18, '\n \t\t\t\t\t\t\t \n', 'Set a label <0xfe>')
(4, ' \n\n', 'Pop stack')
(18, '\n \t\t\t\t\t\t \t\n', 'Set a label <0xfd>')
(9, '\t \n', 'Multiply')
(2, ' \n ', 'Duplicate stack top')
(22, '\n\t\t\t\t\t\t\t\t \n', 'Jump to the label if stack top is negative <0x1fc>')
(20, '\n \n\t\t\t\t\t\t \t\n', 'Jump to the label unconditionally <0xfd>')
(18, '\n \t\t\t\t\t\t \n', 'Set a label <0xfc>')
(9, '\t \n', 'Multiply')
(15, '\t\n \t', 'Output stack top [Number]')
(24, '\n\n\n', 'End the program')
(18, '\n \t\t\t\t\t \t\t\n', 'Set a label <0xfb>')
(1, ' \t\n', 'Push stack (0x1)')
(15, '\t\n \t', 'Output stack top [Number]')
(24, '\n\n', 'End the program')