-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimple.bc.txt
102 lines (102 loc) · 2.78 KB
/
simple.bc.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
1 // Version
0 // Increases the register space ...
1 // ... size to increase
3 // Pushs a constant ...
4 // ... value to push
10 // Copies integer to register ...
0 // ... at address
5 // Calls function ...
23 // ... address of function
24 // Exit program
0 // Increases the register space ...
1 // ... size to increase
4 // Pops an integer from stack and copies to register ...
1 // ... at address
2 // Pushs the value ...
1 // ... at address
2 // Pushs the value ...
1 // ... at address
13 // Muliplies two integers
2 // Pushs the value ...
1 // ... at address
13 // Muliplies two integers
1 // Decreases the register space
9 // Returns
0 // Increases the register space ...
1 // ... size to increase
3 // Pushs a constant ...
7 // ... value to push
10 // Copies integer to register ...
1 // ... at address
3 // Pushs a constant ...
2 // ... value to push
2 // Pushs the value ...
0 // ... at address
13 // Muliplies two integers
2 // Pushs the value ...
1 // ... at address
11 // Adds two integers
6 // Calls external function ...
2 // ... Id of function
3 // Pushs a constant ...
4 // ... value to push
3 // Pushs a constant ...
1 // ... value to push
12 // Substracts two integers
5 // Calls function ...
9 // ... address of function
3 // Pushs a constant ...
12 // ... value to push
12 // Substracts two integers
6 // Calls external function ...
2 // ... Id of function
2 // Pushs the value ...
1 // ... at address
6 // Calls external function ...
2 // ... Id of function
3 // Pushs a constant ...
1 // ... value to push
3 // Pushs a constant ...
67 // ... value to push
8 // Jumps if the condition is not zero
0 // Increases the register space ...
0 // ... size to increase
3 // Pushs a constant ...
123 // ... value to push
6 // Calls external function ...
2 // ... Id of function
1 // Decreases the register space
16 // Increases an integer ...
0 // ... at address
2 // Pushs the value ...
0 // ... at address
6 // Calls external function ...
2 // ... Id of function
17 // Decreases an integer ...
0 // ... at address
2 // Pushs the value ...
0 // ... at address
6 // Calls external function ...
2 // ... Id of function
2 // Pushs the value ...
1 // ... at address
3 // Pushs a constant ...
10 // ... value to push
22 // Compares if the first integer is less than the second
3 // Pushs a constant ...
98 // ... value to push
8 // Jumps if the condition is not zero
0 // Increases the register space ...
0 // ... size to increase
2 // Pushs the value ...
1 // ... at address
6 // Calls external function ...
2 // ... Id of function
16 // Increases an integer ...
1 // ... at address
1 // Decreases the register space
7 // Jumps ...
79 // ... address to jump
1 // Decreases the register space
9 // Returns
1 // Decreases the register space