-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstacktrace1.txt
More file actions
28 lines (26 loc) · 855 Bytes
/
stacktrace1.txt
File metadata and controls
28 lines (26 loc) · 855 Bytes
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
PL/0 code:
0 INC 6
1 INP
2 STO 0 5
3 LOD 0 5
4 LIT 56
5 ADD
6 STO 0 4
7 LOD 0 4
8 OUT
9 HLT
Execution:
pc bp sp stack
0 1 0
0 INC 6 1 1 6 0 0 0 0 0 0
1 INP read 5 from input
2 1 7 0 0 0 0 0 0 5
2 STO 0 5 3 1 6 0 0 0 0 0 5
3 LOD 0 5 4 1 7 0 0 0 0 0 5 5
4 LIT 56 5 1 8 0 0 0 0 0 5 5 56
5 ADD 6 1 7 0 0 0 0 0 5 61
6 STO 0 4 7 1 6 0 0 0 0 61 5
7 LOD 0 4 8 1 7 0 0 0 0 61 5 61
8 OUT 61
9 1 6 0 0 0 0 61 5
9 HLT 10 1 6 0 0 0 0 61 5