The example of compilation results
Program text |
1 | PROGRAM TypConst; |
2 | CONST n=4; |
3 | t:INTEGER=5; |
4 | VAR w:INTEGER; |
5 | BEGIN w:=t-n; t:=w+1; |
6 | WRITELN(t); |
7 | END. |
Memory map |
0000 - 0007 | initialization |
0008 - 0009 | typed constants |
000A - 000A | BEGIN |
000A - 0013 | W:= ... |
0014 - 001D | T:= ... |
001E - 002D | WRITELN( ) |
002E - 002F | END. |
0030 - 00DD | FREE MEMORY |
00DE - 00DF | variables |
00E0 - 00FF | work cells |
Errors:
SUCCESSFUL COMPILATION
codes | address | comments |
0E6D | 0000 |
set stack pointer |
0100 | 0002 |
1C0D | 0004 |
to main program |
000A | 0006 |
0005 | 0008 |
variable T |
01E1 | 000A
| W:=... |
0008 | 000C |
2341 | 000E |
- |
011E | 0010 |
save the result |
00DE | 0012 |
01E1 | 0014
| T:=... |
00DE | 0016 |
2211 | 0018 |
+ |
011E | 001A |
save the result |
0008 | 001C |
01E1 | 001E |
WRITELN ... |
0008 | 0020 |
01D3 | 0022 |
set buffer address |
00E0 | 0024 |
9C0D | 0026 |
variable value output |
4068 | 0028 |
(INTEGER type) |
9C0D | 002A |
next line (LN) |
40EC | 002C |
CF98 | 002E |
STOP |
.... | .... |
| 00DE |
variable W |
| 00E0 |
output buffer (6 bytes) |
.... | .... |
| 00E6 |
stack (to 0100) |
.... | .... |
To previous page.