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 - 0007initialization
0008 - 0009typed constants
000A - 000ABEGIN
000A - 0013W:= ...
0014 - 001DT:= ...
001E - 002DWRITELN( )
002E - 002FEND.
0030 - 00DDFREE MEMORY
00DE - 00DFvariables
00E0 - 00FFwork cells
Errors:
SUCCESSFUL COMPILATION

codesaddresscomments
0E6D0000 set stack pointer
01000002
1C0D0004 to main program
000A0006
00050008 variable T
01E1000A W:=...
0008000C
2341000E -
011E0010 save the result
00DE0012
01E10014 T:=...
00DE0016
22110018 +
011E001A save the result
0008001C
01E1001E WRITELN ...
00080020
01D30022 set buffer address
00E00024
9C0D0026 variable value output
40680028 (INTEGER type)
9C0D002A next line (LN)
40EC002C
CF98002E STOP
........
00DE variable W
00E0 output buffer (6 bytes)
........
00E6 stack (to 0100)
........

To previous page.