Browse Source

* Internal docs from Carl, initial Tex translation

marco 24 years ago
parent
commit
6e0ab0a8a3

+ 49 - 0
docs/internal/Makefile

@@ -0,0 +1,49 @@
+#######################################################################
+#
+# Makefile to compile all examples and convert them to PDF/PS
+# 
+#######################################################################
+
+
+# Script to convert the programs to LaTeX examples which can be included.
+FIG2DEV=fig2dev -L
+
+#######################################################################
+# No need to edit after this line.
+#######################################################################
+
+.SUFFIXES: .png .pdf .fig .eps
+
+.PHONY: all tex clean
+
+SOURCEOBJECTS=arch1 arch2 arch3 arch4 arch5 arch6 arch7 arch8 arch9 arch10 arch11
+
+FIGSOURCE=$(addsuffix .fig, $(SOURCEOBJECTS))
+
+PDFOBJECTS=$(addsuffix .pdf, $(SOURCEOBJECTS))
+
+PNGOBJECTS=$(addsuffix .png, $(SOURCEOBJECTS))
+
+PSOBJECTS=$(addsuffix .eps, $(SOURCEOBJECTS))
+
+pdf : $(PDFOBJECTS)
+
+png : $(PNGOBJECTS)
+
+eps  : $(PSOBJECTS)
+
+all : pdf png eps
+
+clean : 
+	rm -f $(PDFOBJECTS) $(PNGOBJECTS) $(PSOBJECTS)
+ 
+$(PDFOBJECTS): %.pdf: %.fig
+	$(FIG2DEV) pdf $*.fig $*.pdf 
+
+$(PNGOBJECTS): %.png: %.fig
+	$(FIG2DEV) png $*.fig $*.png 
+
+$(PSOBJECTS): %.eps: %.fig
+	$(FIG2DEV) eps $*.fig $*.eps
+
+ 

+ 216 - 0
docs/internal/arch1.fig

@@ -0,0 +1,216 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 4615 1784 5611 2843
+6 4615 2220 5611 2469
+4 1 0 50 0 2 7 0.0000 0 62 897 5105 2305 TYPE CHECKING\001
+4 1 0 50 0 0 7 0.0000 0 100 486 5105 2416 (pass_1.pas)\001
+-6
+2 4 0 1 0 7 50 0 -1 4.000 0 0 3 0 0 5
+	 5547 2819 5547 1820 4642 1820 4642 2819 5547 2819
+-6
+6 6047 1970 7168 2469
+6 6047 2095 7168 2407
+4 1 0 50 0 2 7 0.0000 0 62 1046 6593 2216 CODE GENERATION\001
+4 1 0 50 0 0 7 0.0000 0 100 486 6593 2327 (pass_2.pas)\001
+-6
+2 4 0 1 0 7 50 0 -1 4.000 0 0 3 0 0 5
+	 7089 2451 7089 2026 6054 2026 6054 2451 7089 2451
+-6
+6 7542 1846 8850 2656
+6 7604 2033 8788 2531
+6 7604 2157 8788 2282
+4 1 0 50 0 2 7 0.0000 0 87 1121 8200 2239 GENERATOR/LINKER\001
+-6
+4 1 0 50 0 2 7 0.0000 0 62 673 8200 2128 ASSEMBLER\001
+4 1 0 50 0 0 7 0.0000 0 100 411 8200 2349 (aasm.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 436 8200 2460 (aggas.pas)\001
+-6
+2 4 0 1 0 7 50 0 -1 4.000 0 0 3 0 0 5
+	 8817 2636 8817 1878 7589 1878 7589 2636 8817 2636
+-6
+6 1874 1970 3182 2593
+6 1874 2157 3120 2407
+4 1 0 50 0 2 7 0.0000 0 87 1183 2526 2254 SCANNER/TOKENIZER\001
+4 1 0 50 0 0 7 0.0000 0 100 536 2526 2364 (scanner.pas)\001
+-6
+2 4 0 1 0 7 50 0 -1 4.000 0 0 3 0 0 5
+	 3121 2540 3121 2018 1953 2018 1953 2540 3121 2540
+-6
+6 3493 1472 4241 3092
+6 3556 1659 4179 3029
+4 1 0 50 0 2 7 0.0000 0 62 424 3870 1739 PARSER\001
+4 1 0 50 0 0 7 0.0000 0 100 473 3870 1849 (parser.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 448 3870 1960 (pbase.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 461 3870 2069 (pdecl.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 473 3870 2181 (pexpr.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 411 3870 2621 (psub.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 536 3870 2842 (ptconst.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 461 3870 2952 (ptype.pas)\001
+-6
+2 4 0 1 0 7 50 0 -1 4.000 0 0 3 0 0 5
+	 4208 3092 4208 1526 3527 1526 3527 3092 4208 3092
+4 1 0 50 0 0 7 0.0000 0 100 598 3870 2290 (pexports.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 623 3870 2401 (pmodules.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 585 3870 2510 (pstatmnt.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 561 3870 2731 (psystem.pas)\001
+-6
+6 4615 600 5549 1161
+6 4615 787 5549 1036
+4 1 0 50 0 2 7 0.0000 0 62 860 5090 857 SYMBOL TABLE\001
+4 1 0 50 0 0 7 0.0000 0 100 598 5090 968 (symtable.pas)\001
+-6
+2 4 0 1 0 7 50 0 -1 4.000 0 0 3 0 0 5
+	 5538 1159 5538 637 4628 637 4628 1159 5538 1159
+-6
+6 2621 3279 3369 4088
+6 2621 3403 3369 3964
+4 1 0 50 0 2 7 0.0000 0 62 399 2974 3473 INLINE\001
+4 1 0 50 0 2 7 0.0000 0 62 673 2974 3584 ASSEMBLER\001
+4 1 0 50 0 2 7 0.0000 0 62 424 2974 3694 PARSER\001
+4 1 0 50 0 0 7 0.0000 0 100 411 2974 3804 (raint.pas)\001
+4 1 0 50 0 0 7 0.0000 0 100 486 2974 3915 (rautils.pas)\001
+-6
+2 4 0 1 0 7 50 0 -1 4.000 0 0 3 0 0 5
+	 3335 4054 3335 3282 2636 3282 2636 4054 3335 4054
+-6
+6 4552 3216 5051 4338
+4 1 0 50 0 0 7 0.0000 0 87 374 4816 3290 tcadd.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 361 4816 3400 tccal.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 386 4816 3511 tccon.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 386 4816 3621 tccnv.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 386 4816 3730 tcflw.pas\001
+4 1 0 50 0 0 7 0.0000 0 100 349 4816 3841 tcinl.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 386 4816 3951 tcmat.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 436 4816 4062 tcmem.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 361 4816 4172 tcset.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 324 4816 4283 tcld.pas\001
+-6
+6 1874 2656 2497 2905
+4 1 0 50 0 0 7 0.0000 0 87 424 2185 2754 tokens.pas\001
+4 1 0 50 0 0 7 0.0000 0 100 511 2185 2864 switches.pas\001
+-6
+6 8289 3216 8850 3652
+4 1 0 50 0 0 7 0.0000 0 87 436 8566 3282 asmhlp.pas\001
+4 1 0 50 0 0 7 0.0000 0 100 311 8566 3503 link.pas\001
+4 1 0 50 0 0 7 0.0000 0 100 386 8566 3613 script.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 523 8563 3392 assemble.pas\001
+-6
+6 6545 3216 7168 4711
+2 1 0 1 0 0 50 0 0 4.000 0 2 -1 0 0 1
+	 7121 4706
+4 1 0 50 0 0 7 0.0000 0 75 287 6828 3266 cga.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 399 6828 3375 cgadd.pad\001
+4 1 0 50 0 0 7 0.0000 0 87 374 6828 3486 cgcal.pas\001
+4 1 0 50 0 0 7 0.0000 0 75 399 6828 3596 cgcnv.pas\001
+4 1 0 50 0 0 7 0.0000 0 75 399 6828 3706 cgcon.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 399 6828 3818 cgflw.pas\001
+4 1 0 50 0 0 7 0.0000 0 100 361 6828 3927 cginl.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 336 6828 4038 cgld.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 399 6828 4147 cgmat.pas\001
+4 1 0 50 0 0 7 0.0000 0 75 448 6828 4258 cgmem.pas\001
+4 1 0 50 0 0 7 0.0000 0 87 374 6828 4368 cgset.pas\001
+-6
+6 3427 2140 3517 2410
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3427 2140 3517 2275
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3427 2410 3517 2275
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3429 2145 3429 2218
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3429 2335 3429 2408
+-6
+6 4543 2140 4633 2410
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4543 2140 4633 2275
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4543 2410 4633 2275
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4545 2145 4545 2218
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4545 2335 4545 2408
+-6
+6 5957 2103 6047 2373
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5957 2103 6047 2238
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5957 2373 6047 2238
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5959 2108 5959 2181
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5959 2298 5959 2371
+-6
+6 7487 2107 7577 2377
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7487 2107 7577 2242
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7487 2377 7577 2242
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7489 2112 7489 2185
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7489 2302 7489 2375
+-6
+2 1 0 1 0 0 50 0 0 4.000 0 2 -1 1 0 3
+	1 1 1.00 29.40 58.79
+	 3841 1519 3841 880 4613 880
+2 1 0 1 0 0 50 0 0 4.000 0 2 -1 1 0 2
+	1 1 1.00 29.40 58.79
+	 5098 1820 5098 1173
+2 1 0 1 0 0 50 0 0 4.000 0 2 -1 1 0 3
+	1 1 1.00 29.40 58.79
+	 6569 2018 6569 880 5532 880
+2 1 0 1 0 0 50 0 0 4.000 0 2 -1 1 0 2
+	1 1 1.00 29.40 58.79
+	 2453 2555 2636 3636
+2 1 0 1 0 0 50 0 0 4.000 0 2 -1 1 0 2
+	1 1 1.00 29.40 58.79
+	 3335 3312 3620 3084
+2 1 0 1 0 7 52 0 -1 0.000 0 0 -1 1 0 3
+	1 1 1.00 34.48 68.95
+	 6565 2449 6565 5138 5712 5138
+2 1 0 1 0 0 53 0 0 0.000 0 2 -1 1 0 2
+	1 1 1.00 29.30 58.61
+	 5084 2827 5084 4716
+2 1 0 1 0 0 52 0 0 0.000 0 2 -1 1 0 3
+	1 1 1.00 29.30 58.61
+	 3864 3099 3864 5113 4467 5113
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	1 1 1.00 34.48 68.95
+	 8194 2657 8194 5837 5091 5837 5091 5526
+2 4 0 1 0 0 50 0 0 4.000 0 2 3 0 0 5
+	 5715 5539 5715 4731 4467 4731 4467 5539 5715 5539
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3430 2213 3130 2213
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3430 2340 3130 2340
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4547 2220 4217 2220
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4550 2340 4217 2340
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 5960 2187 5557 2187 5557 2183
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5960 2293 5557 2293
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7490 2190 7100 2190
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7490 2310 7100 2310
+4 1 0 48 0 2 7 0.0000 0 87 797 5090 4958 PROCESSOR/OS\001
+4 1 0 48 0 2 7 0.0000 0 62 1345 5090 5069 SPECIFIC INFORMATION\001
+4 1 0 48 0 0 7 0.0000 0 100 523 5090 5179 (cpuasm.pas)\001
+4 1 0 48 0 0 7 0.0000 0 100 548 5098 5274 (cpubase.pas)\001
+4 1 0 48 0 0 7 0.0000 0 100 548 5098 5384 (systems.pas)\001

+ 97 - 0
docs/internal/arch10.fig

@@ -0,0 +1,97 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 562 1215 6390 4950
+5 1 0 1 0 7 50 0 -1 4.000 0 1 1 1 3502.689 4278.771 3463 3843 3177 4571 3934 4205
+	1 1 1.00 39.57 79.14
+	1 1 1.00 39.57 79.14
+5 1 0 1 0 7 50 0 -1 4.000 0 0 1 1 5933.248 3417.902 5971 2982 6259 3710 5502 3344
+	1 1 1.00 39.57 79.14
+	1 1 1.00 39.57 79.14
+5 1 0 1 0 7 50 0 -1 4.000 0 1 1 1 2112.843 3308.885 2074 2873 1787 3601 2544 3234
+	1 1 1.00 39.57 79.14
+	1 1 1.00 39.57 79.14
+6 2532 1379 3066 1666
+4 1 0 50 0 0 7 0.0000 2 68 479 2796 1474 Procedure\001
+4 1 0 50 0 0 7 0.0000 2 109 315 2796 1603 parsing\001
+-6
+6 4995 1297 6185 1831
+4 1 0 50 0 5 7 0.0000 2 109 1163 5576 1766 (Do_Secondpass())\001
+4 1 0 50 0 0 7 0.0000 2 109 506 5586 1523 dispatching\001
+4 1 0 50 0 0 7 0.0000 2 95 369 5586 1652 2nd pass\001
+4 1 0 50 0 0 7 0.0000 2 82 930 5586 1395 node code generator\001
+-6
+6 5364 3883 6144 4129
+4 0 0 50 0 0 7 0.0000 2 82 424 5379 3971 recursive\001
+4 0 0 50 0 0 7 0.0000 2 96 725 5379 4100 code generation\001
+-6
+6 3394 3555 4502 4088
+4 1 0 50 0 0 7 0.0000 2 109 643 3934 3655 type checking\001
+4 1 0 50 0 0 7 0.0000 2 96 1067 3934 3783 generic tree generation\001
+4 1 0 50 0 0 7 0.0000 2 109 506 3934 3912 dispatching\001
+4 1 0 50 0 0 7 0.0000 2 109 424 3934 4041 (1st pass)\001
+-6
+6 2081 2775 2778 3021
+4 1 0 50 0 0 7 0.0000 2 68 629 2424 2863 Other blocks \001
+4 1 0 50 0 0 7 0.0000 2 109 315 2424 2992 parsing\001
+-6
+6 2573 4581 3312 4868
+4 0 0 50 0 0 7 0.0000 2 82 424 2603 4694 recursive\001
+4 0 0 50 0 0 7 0.0000 2 96 698 2603 4822 tree generation\001
+-6
+1 3 0 1 0 7 50 0 -1 4.000 1 0.0000 2430 2903 341 341 2430 2903 2558 3220
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 5047 2711 5976 2711 5976 3344 5047 3344 5047 2711
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 2351 1241 3281 1241 3281 1874 2351 1874 2351 1241
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 39.57 79.14
+	 3281 1523 5032 1519
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 39.57 79.14
+	 5487 1864 5487 2682
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 3469 3572 4399 3572 4399 4205 3469 4205 3469 3572
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 39.57 79.14
+	 2776 2903 3928 3562
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 39.57 79.14
+	 2781 1884 2434 2567
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 39.57 79.14
+	 1199 1583 2193 2646
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 39.57 79.14
+	 1194 1543 2331 1543
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 5026 1241 6135 1241 6135 1870 5026 1870 5026 1241
+3 2 0 1 0 7 50 0 -1 4.000 0 1 0 4
+	1 1 1.00 39.57 79.14
+	 2440 2558 3123 2429 3503 2009 3285 1519
+	 0.000 -1.000 -1.000 0.000
+4 1 0 50 0 5 7 0.0000 2 96 958 4116 1419 GenerateCode()\001
+4 1 0 50 0 5 7 0.0000 2 96 889 2801 1721 (Read_Proc())\001
+4 0 0 50 0 5 7 0.0000 2 96 958 5161 3101 (SecondPass())\001
+4 1 0 50 0 0 7 0.0000 2 96 1026 5521 2973 actual code generation\001
+4 0 0 50 0 5 7 0.0000 2 96 958 5353 4209 (SecondPass())\001
+4 1 0 50 0 0 7 0.0000 2 109 315 2034 4011 parsing\001
+4 1 0 50 0 0 7 0.0000 2 82 424 2034 3883 recursive\001
+4 1 0 50 0 0 7 0.0000 2 109 547 866 1563 start parsing\001
+4 0 0 50 0 5 7 0.0000 2 96 889 2583 4936 (FirstPass())\001
+4 0 0 50 0 5 7 0.0000 2 96 1094 3503 4160 (Do_FirstPass())\001
+4 0 0 45 0 0 7 0.0000 2 82 821 3162 2172 After tree is built\001
+-6

+ 68 - 0
docs/internal/arch11.fig

@@ -0,0 +1,68 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 2115 2340 8325 4370
+6 6136 3892 6972 4211
+4 1 0 50 0 0 9 0.0000 2 120 809 6546 4008 DoAssemble()\001
+4 1 0 50 0 0 9 0.0000 2 120 809 6546 4167 (assemble.pas)\001
+-6
+6 3946 3574 4424 3733
+6 3946 3574 4424 3733
+6 3946 3574 4424 3733
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4419 3575 4202 3719
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3982 3575 4202 3719
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4409 3579 4292 3579
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4104 3579 3986 3579
+-6
+-6
+-6
+6 3747 2340 4623 2937
+4 1 0 50 0 0 9 0.0000 2 93 862 4189 2454 section list data\001
+4 1 0 50 0 0 9 0.0000 2 120 796 4189 2612 (codesegment)\001
+4 1 0 50 0 0 9 0.0000 2 120 783 4189 2772 (datasegment)\001
+4 1 0 50 0 0 9 0.0000 2 80 199 4189 2930 etc.\001
+-6
+6 2115 3614 3031 3932
+4 1 0 50 0 0 9 0.0000 2 120 849 2576 3721 GenerateAsm()\001
+4 1 0 50 0 0 9 0.0000 2 120 809 2576 3879 (assemble.pas)\001
+-6
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 3622 3744 4786 3744 4786 4368 3622 4368 3622 3744
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 5960 3744 7123 3744 7123 4368 5960 4368 5960 3744
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 42.29 84.58
+	 4796 4019 5960 4019
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 42.29 84.58
+	 2407 4040 3613 4040
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 42.29 84.58
+	 7123 4040 8063 4040
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+	 4098 3585 4098 2951
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+	 4289 3575 4289 2941
+4 0 0 50 0 0 9 0.0000 2 120 610 3866 4188 (aggas.pas)\001
+4 0 0 50 0 0 9 0.0000 2 120 677 3866 4029 WriteTree()\001
+4 1 0 50 0 0 9 0.0000 2 93 770 5377 3903 assembler file\001
+4 1 0 50 0 0 9 0.0000 2 120 358 8143 3770 Object\001
+4 1 0 50 0 0 9 0.0000 2 93 226 8143 3929 File\001
+-6

+ 161 - 0
docs/internal/arch2.fig

@@ -0,0 +1,161 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 3426 1170 9270 7920
+6 3463 3169 6518 4149
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 4711 4124 4711 3195 3479 3195 3479 4124 4711 4124
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 6487 4124 6487 3195 5255 3195 5255 4124 6487 4124
+-6
+6 3463 1924 6518 2905
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 4720 2883 4720 1954 3488 1954 3488 2883 4720 2883
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 6496 2883 6496 1954 5263 1954 5263 2883 6496 2883
+-6
+6 3652 2301 4594 2565
+4 1 0 50 0 0 9 0.0000 4 88 327 4113 2535 Parser\001
+4 1 0 50 0 0 9 0.0000 4 88 905 4113 2401 Inline Assembler\001
+-6
+6 3577 5544 4594 5846
+4 1 0 50 0 0 9 0.0000 4 88 855 4068 5633 internal variable\001
+4 1 0 50 0 0 9 0.0000 4 113 980 4068 5784 states for compiler\001
+-6
+6 4708 2150 4896 2716
+6 4708 2150 4896 2716
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4887 2695 4716 2438
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4887 2176 4716 2438
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4881 2683 4881 2544
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4881 2320 4881 2181
+-6
+-6
+6 4708 3357 4896 3923
+6 4708 3357 4896 3923
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4887 3902 4716 3645
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4887 3383 4716 3645
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4881 3890 4881 3751
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4881 3527 4881 3388
+-6
+-6
+6 3765 6109 4331 6299
+6 3765 6109 4331 6299
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3790 6299 4048 6128
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4309 6299 4048 6128
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3802 6294 3941 6294
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4165 6294 4305 6294
+-6
+-6
+6 4670 6826 4896 7392
+6 4670 6826 4896 7392
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4861 7377 4690 7119
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4861 6859 4690 7119
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4856 7365 4856 7226
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4856 7003 4856 6862
+-6
+-6
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 8994 3553 8994 2624 7762 2624 7762 3553 8994 3553
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 8994 4900 8994 3972 7762 3972 7762 4900 8994 4900
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 8985 6221 8985 5293 7755 5293 7755 6221 8985 6221
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 8994 7588 8994 6659 7762 6659 7762 7588 8994 7588
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 6398 7579 6398 6649 5166 6649 5166 7579 6398 7579
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 4676 7579 4676 6649 3443 6649 3443 7579 4676 7579
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 2.00 71.41 142.81
+	 7762 7150 6415 7150
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 2.00 71.41 142.81
+	 7755 5766 6478 4106
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 2.00 71.41 142.81
+	 7762 4418 6487 3846
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 2.00 71.41 142.81
+	 7762 3079 6487 3570
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 2.00 71.41 142.81
+	 7745 1723 6487 3205
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 9244 7704 7522 7704 7522 1196 9244 1196 9244 7704
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 6746 4248 4997 4248 4997 1839 6746 1839 6746 4248
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 2.00 71.41 142.81
+	 7058 2428 6504 2428
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 8985 2231 8985 1303 7755 1303 7755 2231 8985 2231
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7755 2071 7209 2071
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7762 2766 7218 2766
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 7209 2080 7067 2428 7218 2758
+2 4 0 1 0 7 50 0 -1 0.000 0 0 4 0 0 5
+	 4676 6130 4676 5202 3443 5202 3443 6130 4676 6130
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 1
+	 5249 3669
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4884 3759 5248 3759
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4884 3526 5248 3526
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4877 2546 5255 2546
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4884 2314 5261 2314
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3941 6292 3941 6650
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4167 6299 4167 6650
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4865 7003 5160 7003
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4859 7228 5160 7228
+4 0 0 50 0 0 9 0.0000 4 88 666 8084 7900 Scanner Core\001
+4 0 0 50 0 0 9 0.0000 4 113 603 8102 1811 ReadChar()\001
+4 0 0 50 0 0 9 0.0000 4 113 678 8093 4481 ReadString()\001
+4 0 0 50 0 0 9 0.0000 4 113 867 7977 3142 ReadComment()\001
+4 0 0 50 0 0 9 0.0000 4 113 754 8031 7150 ReadPreproc()\001
+4 0 0 50 0 0 9 0.0000 4 113 780 8048 5811 ReadNumber()\001
+4 0 0 50 0 0 9 0.0000 4 113 792 5523 2463 AsmGetChar()\001
+4 0 0 50 0 0 9 0.0000 4 113 666 5523 3678 ReadToken()\001
+4 1 0 50 0 0 9 0.0000 4 88 678 4103 3678 Pascal Parser\001
+4 1 0 50 0 0 9 0.0000 4 88 678 4050 7167 PreProcessor\001
+4 1 0 50 0 0 9 0.0000 4 113 1005 5800 7150 HandleDirectives()\001
+4 1 0 50 0 0 9 0.0000 4 88 251 5853 3062 Text\001
+4 1 0 50 0 0 9 0.0000 4 88 880 5889 4534 Scanner Interface\001
+-6

+ 93 - 0
docs/internal/arch3.fig

@@ -0,0 +1,93 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 1575 -1200 5475 2486
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 2487 1324 222 233 2487 1324 2487 1557
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 3202 2208 222 233 3202 2208 3202 2440
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 1797 2236 222 233 1797 2236 1797 2468
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4522 1267 222 233 4522 1267 4522 1501
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 3804 2188 222 233 3804 2188 3804 2420
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 5200 2197 222 233 5200 2197 5200 2431
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 2800 -913 222 233 2800 -913 2800 -680
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 2110 11 222 233 2110 11 2110 245
+1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 3513 29 222 233 3513 29 3513 262
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 2645 -767 2477 -592
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 2987 -758 3154 -582
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3352 198 3018 548
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 45.69 91.38
+	 2895 685 2504 1092
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3681 192 4014 542
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 2304 1468 2138 1643
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 2683 1456 2850 1632
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 45.69 91.38
+	 2013 1780 1789 2016
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 45.69 91.38
+	 3028 1810 3194 1986
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 45.69 91.38
+	 4205 731 4511 1053
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4322 1402 4154 1579
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 45.69 91.38
+	 4027 1720 3804 1952
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4697 1441 4865 1618
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 45.69 91.38
+	 5035 1801 5202 1977
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 45.69 91.38
+	 2355 -483 2102 -224
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 45.69 91.38
+	 3321 -416 3513 -214
+4 0 0 50 0 2 13 0.0000 0 101 101 2443 1374 *\001
+4 0 0 50 0 0 9 0.7854 0 101 190 2048 1807 left\001
+4 0 0 50 0 0 9 5.4978 0 135 256 2829 1661 right\001
+4 0 0 50 0 2 13 0.0000 0 145 101 3180 2240 y\001
+4 0 0 50 0 2 13 0.0000 0 101 101 1765 2264 x\001
+4 0 0 50 0 0 12 0.0000 0 111 178 4444 1292 shl\001
+4 0 0 50 0 0 9 0.7854 0 101 190 4060 1755 left\001
+4 0 0 50 0 2 13 0.0000 0 145 101 3765 2223 6\001
+4 0 0 50 0 0 9 5.4978 0 135 256 4841 1655 right\001
+4 0 0 50 0 2 13 0.0000 0 101 101 5164 2223 x\001
+4 0 0 50 0 0 9 0.7854 0 101 190 2388 -451 left\001
+4 0 0 50 0 0 9 5.4978 0 135 256 3170 -535 right\001
+4 0 0 50 0 0 9 0.7854 0 101 190 2935 693 left\001
+4 0 0 50 0 0 9 5.4978 0 135 256 4034 589 right\001
+4 0 0 50 0 2 13 0.0000 0 111 123 3465 64 +\001
+4 0 0 50 0 2 13 0.0000 0 101 178 2730 -877 :=\001
+4 0 0 50 0 2 13 0.0000 0 101 101 2056 57 x\001
+4 0 0 50 0 0 9 0.0000 0 101 301 2329 -174 loadn\001
+4 0 0 50 0 0 9 0.0000 0 135 434 3038 -1063 assignn\001
+4 0 0 50 0 0 9 0.0000 0 101 268 3729 -185 addn\001
+4 0 0 50 0 0 9 0.0000 0 101 268 2708 1132 muln\001
+4 0 0 50 0 0 9 0.0000 0 101 301 2793 2014 loadn\001
+4 0 0 50 0 0 9 0.0000 0 101 301 2055 2014 loadn\001
+4 0 0 50 0 0 9 0.0000 0 101 301 4791 2011 loadn\001
+4 0 0 50 0 0 9 0.0000 0 101 557 4038 2014 ordconstn\001
+4 0 0 50 0 0 9 0.0000 0 101 234 4776 1129 shln\001
+-6

+ 112 - 0
docs/internal/arch4.fig

@@ -0,0 +1,112 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 1431 2781 8569 7068
+6 1764 2781 7144 3904
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 3560 3904 3560 2781 2437 2781 2437 3904 3560 3904
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 5352 3904 5352 2781 4229 2781 4229 3904 5352 3904
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 7144 3904 7144 2781 6021 2781 6021 3904 7144 3904
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 3565 3309 4228 3309
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 5348 3309 6012 3309
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 1764 3309 2427 3309
+-6
+6 3862 5945 8569 7068
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 8569 7068 8569 5945 7446 5945 7446 7068 8569 7068
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 6777 7068 6777 5945 5654 5945 5654 7068 6777 7068
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 4985 7068 4985 5945 3862 5945 3862 7068 4985 7068
+-6
+6 3241 4702 4161 5204
+4 1 0 50 0 0 10 0.0000 4 144 920 3700 4810 hash dictionary\001
+4 1 0 50 0 0 10 0.0000 4 144 633 3700 4989 hash array\001
+4 1 0 50 0 0 10 0.0000 4 144 657 3700 5168 of symbols\001
+-6
+6 5021 4714 5941 5216
+4 1 0 50 0 0 10 0.0000 4 144 920 5480 4822 hash dictionary\001
+4 1 0 50 0 0 10 0.0000 4 144 633 5480 5001 hash array\001
+4 1 0 50 0 0 10 0.0000 4 144 657 5480 5180 of symbols\001
+-6
+6 6825 4690 7745 5192
+4 1 0 50 0 0 10 0.0000 4 144 920 7284 4798 hash dictionary\001
+4 1 0 50 0 0 10 0.0000 4 144 633 7284 4977 hash array\001
+4 1 0 50 0 0 10 0.0000 4 144 657 7284 5156 of symbols\001
+-6
+6 2619 3149 3420 3472
+4 1 0 50 0 0 10 0.0000 4 144 765 3019 3257 symbol table\001
+4 1 0 50 0 0 10 0.0000 4 144 800 3019 3436 (TSymTable)\001
+-6
+6 4423 3137 5224 3460
+4 1 0 50 0 0 10 0.0000 4 144 765 4823 3245 symbol table\001
+4 1 0 50 0 0 10 0.0000 4 144 800 4823 3424 (TSymTable)\001
+-6
+6 6203 3161 7004 3484
+4 1 0 50 0 0 10 0.0000 4 144 765 6603 3268 symbol table\001
+4 1 0 50 0 0 10 0.0000 4 144 800 6603 3448 (TSymTable)\001
+-6
+6 4053 6256 4818 6757
+4 1 0 50 0 0 10 0.0000 4 144 765 4435 6363 symbol table\001
+4 1 0 50 0 0 10 0.0000 4 108 418 4435 6542 entries\001
+4 1 0 50 0 0 10 0.0000 4 144 466 4435 6722 (TSym)\001
+-6
+6 5869 6244 6634 6745
+4 1 0 50 0 0 10 0.0000 4 144 765 6251 6351 symbol table\001
+4 1 0 50 0 0 10 0.0000 4 108 418 6251 6530 entries\001
+4 1 0 50 0 0 10 0.0000 4 144 466 6251 6710 (TSym)\001
+-6
+6 7637 6244 8402 6745
+4 1 0 50 0 0 10 0.0000 4 144 765 8019 6351 symbol table\001
+4 1 0 50 0 0 10 0.0000 4 108 418 8019 6530 entries\001
+4 1 0 50 0 0 10 0.0000 4 144 466 8019 6710 (TSym)\001
+-6
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 4260 5491 4260 4368 3137 4368 3137 5491 4260 5491
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 6052 5491 6052 4368 4929 4368 4929 5491 6052 5491
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 7844 5491 7844 4368 6721 4368 6721 5491 7844 5491
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 2954 3914 3695 4368
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 4782 3902 5522 4356
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 6586 3902 7327 4356
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 3683 5491 4423 5945
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 5463 5491 6203 5945
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 47.79 95.58
+	 7291 5491 8031 5945
+4 1 0 50 0 0 10 0.0000 4 144 944 1903 3041 SymTableStack\001
+4 1 0 50 0 0 10 0.0000 4 84 263 3874 3030 next\001
+4 1 0 50 0 0 10 0.0000 4 84 263 5690 2994 next\001
+-6

+ 52 - 0
docs/internal/arch5.fig

@@ -0,0 +1,52 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 1938 2160 3465 6345
+6 2088 5798 3361 6081
+4 1 0 50 0 0 9 0.0000 2 122 1225 2703 5913 insert symbol into hash\001
+4 1 0 50 0 0 9 0.0000 2 94 264 2703 6074 table\001
+-6
+6 1947 4668 3456 4997
+4 1 0 50 0 0 9 0.0000 2 122 1470 2709 4771 check if the symbol already\001
+4 1 0 50 0 0 9 0.0000 2 122 1329 2709 4932 exists , if so give an error\001
+-6
+6 1995 3442 3408 3960
+4 1 0 50 0 0 9 0.0000 2 122 858 2709 3574 call the symbols\001
+4 1 0 50 0 0 9 0.0000 2 122 1386 2709 3895 (aligns the data correctly)\001
+-6
+6 2136 2405 3267 2735
+4 1 0 50 0 0 9 0.0000 2 122 1084 2705 2509 set owner of symbol\001
+4 1 0 50 0 0 9 0.0000 2 122 1027 2705 2670 to this symbol table\001
+-6
+2 4 0 1 0 7 50 0 -1 0.000 0 0 5 0 0 5
+	 3439 2944 3439 2181 1959 2181 1959 2944 3439 2944
+2 4 0 1 0 7 50 0 -1 0.000 0 0 5 0 0 5
+	 3439 4075 3439 3312 1959 3312 1959 4075 3439 4075
+2 4 0 1 0 7 50 0 -1 0.000 0 0 5 0 0 5
+	 3439 6338 3439 5574 1959 5574 1959 6338 3439 6338
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 37.70 75.41
+	 2638 2963 2638 3312
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 37.70 75.41
+	 2629 4094 2629 4434
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 37.70 75.41
+	 2648 5216 2648 5546
+2 4 0 1 0 7 50 0 -1 0.000 0 0 5 0 0 5
+	 3439 5207 3439 4443 1959 4443 1959 5207 3439 5207
+4 1 0 50 0 0 9 0.0000 2 122 1197 2694 3729 insert_in_data method\001
+-6

+ 63 - 0
docs/internal/arch6.fig

@@ -0,0 +1,63 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 4096 4185 8910 7920
+6 4096 4185 8910 7920
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 7714 6407 7714 5723 6539 5723 6539 6407 7714 6407
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 54.66 109.32
+	 7086 6399 5809 7219
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 54.66 109.32
+	 7078 6415 8356 7234
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 6444 7894 6444 7211 5270 7211 5270 7894 6444 7894
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 8904 7918 8904 7234 7730 7234 7730 7918 8904 7918
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 6541 4879 6541 4195 5367 4195 5367 4879 6541 4879
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 54.66 109.32
+	 5914 4871 4635 5691
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 54.66 109.32
+	 5905 4887 7183 5707
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 5271 6367 5271 5683 4097 5683 4097 6367 5271 6367
+-6
+6 5468 4360 6518 4681
+4 1 0 50 0 0 9 0.0000 2 126 1021 5982 4465 symbol table entry\001
+4 1 0 50 0 0 9 0.0000 2 126 438 5982 4630 (TSym)\001
+-6
+6 6751 5907 7538 6228
+4 1 0 50 0 0 9 0.0000 2 126 778 7144 6011 type definition\001
+4 1 0 50 0 0 9 0.0000 2 126 389 7144 6177 (TDef)\001
+-6
+6 5322 7395 6430 7716
+4 1 0 50 0 0 9 0.0000 2 126 1089 5870 7509 specific information\001
+4 1 0 50 0 0 9 0.0000 2 126 428 5870 7675 for type\001
+-6
+6 7859 7336 8793 7803
+4 1 0 50 0 0 9 0.0000 2 126 914 8331 7441 sybol table entry\001
+4 1 0 50 0 0 9 0.0000 2 117 584 8331 7607 type name\001
+4 1 0 50 0 0 9 0.0000 2 126 730 8331 7772 (TTypeSym)\001
+-6
+6 4154 5907 5234 6169
+4 1 0 50 0 0 8 0.0000 2 88 1051 4689 6002 reference information\001
+4 1 0 50 0 0 8 0.0000 2 117 340 4689 6135 (TRef)\001
+-6
+-6

+ 37 - 0
docs/internal/arch7.fig

@@ -0,0 +1,37 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 2012 75 6000 3825
+5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5489.341 1691.633 3474 1790 3901 2936 4755 3571
+	1 1 1.00 44.39 88.78
+5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 2502.554 2656.206 5214 3314 5034 1483 4000 302
+	1 1 1.00 44.39 88.78
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 3997 584 3997 75 3049 75 3049 584 3997 584
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 5703 3825 5703 3316 4755 3316 4755 3825 5703 3825
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 44.39 88.78
+	 3474 584 3474 1283
+2 4 0 1 0 7 50 0 -1 0.000 0 0 6 0 0 5
+	 3949 1790 3949 1283 3001 1283 3001 1790 3949 1790
+4 0 0 50 0 0 10 0.0000 4 143 643 3191 393 TTypeSym\001
+4 0 0 50 0 0 10 0.0000 4 143 381 3285 1601 TType\001
+4 0 0 50 0 0 10 0.0000 4 107 310 5040 3634 TDef\001
+4 0 0 50 0 1 10 0.0000 0 143 643 3238 3125 TType.Def\001
+4 0 0 50 0 1 10 0.0000 0 143 905 5069 1079 TDef.TypeSym\001
+4 0 0 50 0 1 10 0.0000 0 143 1214 2012 952 TTypeSym.ResType\001
+-6

+ 329 - 0
docs/internal/arch8.fig

@@ -0,0 +1,329 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 3219 347 6879 9113
+6 4693 777 5624 1004
+6 4847 804 5466 963
+4 1 0 50 0 0 6 0.0000 2 85 649 5156 863 Increment compile\001
+4 1 0 50 0 0 6 0.0000 2 63 168 5156 963 level\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4693 777 5624 777 5624 1004 4693 1004 4693 777
+-6
+6 4697 1198 5628 1424
+6 4903 1238 5401 1398
+4 1 0 50 0 0 6 0.0000 2 85 510 5153 1297 Save all global\001
+4 1 0 50 0 0 6 0.0000 2 63 524 5153 1398 state variables\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4697 1198 5628 1198 5628 1424 4697 1424 4697 1198
+-6
+6 4689 2818 5611 3183
+6 4892 2842 5441 3141
+4 1 0 50 0 0 6 0.0000 2 63 450 5167 2906 Indicate that\001
+4 1 0 50 0 0 6 0.0000 2 85 549 5167 3013 module is being\001
+4 1 0 50 0 0 6 0.0000 2 85 316 5167 3120 compiled\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4689 2818 5611 2818 5611 3183 4689 3183 4689 2818
+-6
+6 4685 3380 5616 3606
+6 4831 3403 5460 3572
+4 1 0 50 0 0 6 0.0000 2 85 628 5146 3467 Initialize compiler\001
+4 1 0 50 0 0 6 0.0000 2 63 322 5146 3572 switches\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4685 3380 5616 3380 5616 3606 4685 3606 4685 3380
+-6
+6 4681 3803 5613 4029
+6 4936 3833 5431 4022
+4 1 0 50 0 0 6 0.0000 2 63 495 5183 3897 Initialize CPU\001
+4 1 0 50 0 0 6 0.0000 2 71 209 5183 4001 target\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4681 3803 5613 3803 5613 4029 4681 4029 4681 3803
+-6
+6 4685 4218 5616 4444
+6 4922 4243 5440 4431
+4 1 0 50 0 0 6 0.0000 2 85 517 5181 4305 Init and assign\001
+4 1 0 50 0 0 6 0.0000 2 85 517 5181 4409 scanner object\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4685 4218 5616 4218 5616 4444 4685 4444 4685 4218
+-6
+6 4685 5054 5616 5281
+6 4922 5071 5418 5261
+4 1 0 50 0 0 6 0.0000 2 63 495 5170 5135 Initialize code\001
+4 1 0 50 0 0 6 0.0000 2 71 335 5170 5239 generator\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4685 5054 5616 5054 5616 5281 4685 5281 4685 5054
+-6
+6 4629 5487 5673 5987
+6 4629 5487 5673 5987
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5673 5734 5155 5980
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4629 5740 5147 5987
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5155 5495 5673 5740
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4636 5734 5155 5487
+-6
+6 4871 5648 5436 5809
+4 1 0 50 0 0 5 0.0000 2 61 531 5153 5697 Token=UNIT?\001
+4 1 0 50 0 0 5 0.0000 2 88 705 5153 5788 or compile_level=1\001
+-6
+-6
+6 4620 1620 5664 2119
+6 4620 1620 5664 2119
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5664 1866 5145 2112
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4620 1873 5138 2119
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5145 1626 5664 1873
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4626 1866 5145 1620
+-6
+6 4885 1800 5398 1959
+4 1 0 50 0 0 6 0.0000 2 63 538 5141 1860 Current module\001
+4 1 0 50 0 0 6 0.0000 2 63 203 5141 1959 valid?\001
+-6
+-6
+6 5112 5984 5202 6260
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5143 6137 5143 6260
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 5143 5984 5143 6047 5140 6047
+4 1 0 50 0 0 5 0.0000 2 61 113 5157 6118 No\001
+-6
+6 4896 6281 5405 6658
+4 1 0 50 0 0 6 0.0000 2 85 510 5149 6344 Parse program\001
+4 1 0 50 0 0 6 0.0000 2 85 315 5149 6448 or library\001
+4 1 0 50 0 0 6 0.0000 2 71 468 5149 6554 generate tree\001
+4 1 0 50 0 0 6 0.0000 2 63 315 5149 6658 and code\001
+-6
+6 4913 6891 5374 7081
+4 1 0 50 0 0 6 0.0000 2 63 461 5143 6954 Free scanner\001
+4 1 0 50 0 0 6 0.0000 2 85 217 5143 7059 object\001
+-6
+6 5074 8215 5185 8491
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5136 8368 5136 8491
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 5136 8215 5136 8278 5132 8278
+4 1 0 50 0 0 5 0.0000 2 61 140 5129 8351 Yes\001
+-6
+6 5667 5712 5942 5760
+6 5667 5720 5942 5748
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5820 5734 5942 5734
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 5667 5734 5730 5734 5730 5738
+-6
+4 1 0 45 0 0 5 0.0000 2 61 140 5785 5760 Yes\001
+-6
+6 5663 1845 5938 1895
+6 5663 1856 5938 1883
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5816 1870 5938 1870
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 5663 1870 5726 1870 5726 1873
+-6
+4 1 0 45 0 0 5 0.0000 2 61 140 5780 1895 Yes\001
+-6
+6 6114 1790 6749 1958
+4 1 0 50 0 0 6 0.0000 2 63 636 6431 1853 Reset module info\001
+4 1 0 50 0 0 6 0.0000 2 63 377 6431 1958 to defaults\001
+-6
+6 4853 8509 5440 8696
+4 1 0 50 0 0 6 0.0000 2 63 586 5147 8570 Restore all state\001
+4 1 0 50 0 0 6 0.0000 2 85 551 5147 8676 global variables\001
+-6
+6 4816 8889 5461 9113
+5 1 0 1 0 7 50 0 -1 0.000 0 0 0 0 5348.526 9000.474 5352 8889 5460 8997 5349 9112
+5 1 0 1 0 7 50 0 -1 0.000 0 1 0 0 4927.459 9000.487 4925 8889 4816 8997 4928 9112
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4927 8889 5358 8889
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4927 9113 5358 9113
+-6
+6 4840 347 5486 571
+6 4840 347 5486 571
+5 1 0 1 0 7 50 0 -1 0.000 0 0 0 0 5373.049 458.983 5376 347 5485 455 5374 571
+5 1 0 1 0 7 50 0 -1 0.000 0 1 0 0 4952.949 458.981 4950 347 4841 455 4953 571
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4951 348 5383 348
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4951 571 5383 571
+-6
+-6
+6 4877 4659 5441 4826
+4 1 0 50 0 0 6 0.0000 2 63 566 5159 4721 Read first token\001
+4 1 0 50 0 0 6 0.0000 2 63 461 5159 4826 from scanner\001
+-6
+6 4921 8901 5382 9089
+4 1 0 50 0 0 6 0.0000 2 63 391 5153 8963 Decrement\001
+4 1 0 50 0 0 6 0.0000 2 85 461 5153 9068 compile level\001
+-6
+6 6161 5654 6712 5821
+4 1 0 50 0 0 6 0.0000 2 63 447 6436 5716 Indicate that\001
+4 1 0 50 0 0 6 0.0000 2 63 551 6436 5821 module is a unit\001
+-6
+6 5938 6282 6865 6613
+6 6143 6302 6646 6574
+4 1 0 50 0 0 6 0.0000 2 63 502 6394 6364 Parse unit and\001
+4 1 0 50 0 0 6 0.0000 2 71 468 6394 6469 generate tree\001
+4 1 0 50 0 0 6 0.0000 2 63 315 6394 6574 and code\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5938 6282 6865 6282 6865 6613 5938 6613 5938 6282
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5153 573 5153 768
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5153 1001 5153 1197
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5147 1421 5147 1616
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5135 2626 5135 2821
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5139 3184 5139 3380
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5139 3607 5139 3802
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5142 4025 5142 4222
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5139 4438 5139 4634
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5142 4856 5142 5052
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5146 5285 5146 5481
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4681 2395 5613 2395 5613 2622 4681 2622 4681 2395
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 5136 2118 5136 2181 5132 2181
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5132 2272 5132 2394
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4685 6256 5616 6256 5616 6675 4685 6675 4685 6256
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5132 6668 5132 6863
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5132 7101 5132 7297
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4689 7294 5620 7294 5620 7519 4689 7519 4689 7294
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4685 6871 5616 6871 5616 7098 4685 7098 4685 6871
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5136 7516 5136 7712
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4681 6249 5613 6249 5613 6668 4681 6668 4681 6249
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5656 7962 5138 8208
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4612 7968 5131 8215
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5138 7723 5656 7968
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4619 7962 5138 7716
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5936 1760 6866 1760 6866 1986 5936 1986 5936 1760
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	1 1 1.00 27.93 55.87
+	 6382 1986 6382 2499 5620 2499
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4685 8494 5616 8494 5616 8721 4685 8721 4685 8494
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4685 4634 5616 4634 5616 4860 4685 4860 4685 4634
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 5135 8725 5135 8883
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 5669 7964 5958 7964 5958 8139
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	1 1 1.00 27.93 55.87
+	 5955 8408 5955 8597 5624 8594
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5948 5622 6879 5622 6879 5848 5948 5848 5948 5622
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 6398 5849 6398 6285
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	1 1 1.00 27.93 55.87
+	 6397 6615 6397 6983 5618 6983
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 5934 7159 6865 7159 6865 7386 5934 7386 5934 7159
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 6397 6987 6397 7157
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 4691 7404 4185 7404
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 3238 6354 4170 6354 4170 6580 3238 6580 3238 6354
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 3245 7289 4177 7289 4177 7516 3245 7516 3245 7289
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 4675 6456 4173 6455
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 3241 5055 4173 5055 4173 5281 3241 5281 3241 5055
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 4679 5155 4173 5153
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 4681 4745 4181 4745
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 3221 2893 4151 2893 4151 3119 3221 3119 3221 2893
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 27.93 55.87
+	 4689 2988 4160 2988
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 3241 4634 4173 4634 4173 4860 3241 4860 3241 4634
+4 1 0 50 0 0 6 0.0000 2 63 579 5157 2542 Initialize module\001
+4 1 0 50 0 0 5 0.0000 2 61 113 5132 2259 No\001
+4 1 0 50 0 0 6 0.0000 2 85 677 5181 7425 Dispose of the tree\001
+4 1 0 50 0 0 6 0.0000 2 85 600 5147 7988 compile level>=1\001
+4 1 0 50 0 0 6 0.0000 2 85 608 5170 472 Parser.Compile()\001
+4 1 0 50 0 0 6 0.0000 2 63 104 5951 8286 No\001
+4 1 0 50 0 0 6 0.0000 2 85 426 6422 7289 Proc_ unit()\001
+4 1 0 50 0 0 6 0.0000 2 85 824 3679 7416 codegen_donemodule()\001
+4 1 0 50 0 0 6 0.0000 2 85 852 3693 5179 Codegen_NewModule()\001
+4 1 0 50 0 0 5 0.0000 2 61 974 3700 4757 Current_Scanner^.Read_Token()\001
+4 1 0 50 0 0 6 0.0000 2 85 566 3688 6478 Proc_Program()\001
+4 1 0 50 0 0 5 0.0000 2 79 1308 3683 3037 Current_Module^.In_Compile:=TRUE\001
+-6

+ 53 - 0
docs/internal/arch9.fig

@@ -0,0 +1,53 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+Letter  
+100.00
+Single
+-2
+1200 2
+0 32 #aaaaaa
+0 33 #555555
+0 34 #8e8f8e
+0 35 #404040
+0 36 #808080
+0 37 #c0c0c0
+0 38 #e0e0e0
+6 -45 1305 5220 2655
+6 1080 1958 2430 2520
+6 1249 2070 2261 2464
+4 1 0 50 0 0 9 0.0000 2 135 968 1738 2225 register allocator\001
+4 1 0 50 0 0 9 0.0000 2 135 619 1738 2394 subsystem\001
+-6
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 1102 2006 2418 2006 2418 2495 1102 2495 1102 2006
+-6
+6 2768 1958 4118 2520
+6 2824 2070 4061 2408
+4 1 0 50 0 0 9 0.0000 2 135 1148 3442 2180 temporary reference\001
+4 1 0 50 0 0 9 0.0000 2 135 1148 3442 2349 allocator subsystem\001
+-6
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 2772 2000 4088 2000 4088 2490 2772 2490 2772 2000
+-6
+6 1474 1395 3668 1958
+4 1 0 50 0 0 9 0.0000 2 101 2126 2570 1713 Generates code for each of the nodes\001
+4 1 0 50 0 0 9 0.0000 2 135 1294 2570 1882 created in the 1st pass\001
+4 1 0 50 0 2 9 0.0000 2 101 990 2570 1544 Code Generator\001
+-6
+6 4399 1339 5186 1845
+4 1 0 50 0 0 9 0.0000 2 101 585 4797 1472 assembler\001
+4 1 0 50 0 0 9 0.0000 2 101 675 4797 1640 instructions\001
+4 1 0 50 0 0 9 0.0000 2 135 698 4797 1809 (in memory)\001
+-6
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 972 2624 4223 2624 4223 1331 972 1331 972 2624
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
+	1 1 1.00 45.00 90.00
+	 4223 1967 5191 1967
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	1 1 1.00 45.00 90.00
+	 -45 1913 934 1913
+4 1 0 50 0 0 9 0.0000 2 101 596 376 1718 tree nodes\001
+-6

+ 5390 - 0
docs/internal/comparch.tex

@@ -0,0 +1,5390 @@
+\documentclass [12pt]{article}
+\usepackage {graphicx}
+\usepackage {fpc}
+\usepackage {longtable}
+%\usepackage {float}
+\usepackage{listings}
+\lstset{language=Delphi}
+\lstset{basicstyle=\sffamily\small}
+\lstset{commentstyle=\itshape}
+\lstset{keywordstyle=\bfseries}
+\lstset{frame=tb}
+% eats mem for longtable, but speeds up. Set to 10 for minimal mem req.
+\setcounter{LTchunksize}{200}
+% right aligned longtables
+\setlength\LTleft{0pt}
+\setlength\LTright\fill
+%\restylefloat{table}
+%\restylefloat{longtable}
+%\squeezetable
+\setcounter{totalnumber}{10}
+% This comes from the MDWTOOLS package and should discourage floating.
+\def\textfraction{0.1}
+\def\topfraction{0.9}
+\def\bottomfraction{0.9}
+\def\floatpagefraction{0.7}
+\def\fps@figure{htbp}
+\def\fpc@longtable{h}
+
+
+\title{FREE PASCAL}
+\title{Free Pascal 1.0.x Internal documentation}
+\author{Carl Eric Cod\`{e}re}
+\makeindex
+\begin{document}
+\maketitle
+\tableofcontents
+\newpage
+\listoffigures
+\newpage 
+
+\textbf{TODO:}
+\begin{itemize}
+\item Explain architecture of the symbol table + API 
+\item Describe in detail tsymtable, including all methods and fields 
+\item Describe in detail procinfo (tprocinfo) 
+\item Explain how a symbol is inserted into the symbol table (and how alignment requirements are met) 
+\item Explain pparaitem 
+\item Explain all symbol table fields 
+\item Finish all internal routines definitions 
+\item Architecture of the assembler generators + API 
+\item Architecture of the PPU file and information 
+\item Explain systems.pas 
+\item Compiler DEFINES 
+\item routine parsing and code generation algorithm 
+\item (MvdV) OS specific stuff (like hardcoded linker includedirs)
+\end{itemize}
+
+\section{Introduction}
+\label{sec:introductionappendix}
+
+This document will describe the internal architecture of the Free Pascal 
+Compiler version 1.0 release. This document is meant to be used as a guide 
+for those who wish to understand how the compiler was created. Most of the 
+architecture of the compiler described herein is based on the m68k version 
+on the compiler, the i386 version of the compiler ressembles closely the 
+m68k version, but there are subtle differences in the different interfaces.
+
+The architecture, and the different passes of the compiler are shown in the 
+following diagram:
+
+\begin{figure}
+\ifpdf
+% \epsfig{file=arch1d.pdf,width=\textwidth}
+ \includegraphics{arch1.pdf}
+\else
+\includegraphics[width=6.45in,height=4.95in]{arch1.eps}
+\fi
+\caption{TTREE structure}
+\label{fig1}
+\end{figure}
+
+\section{Scanner / Tokenizer}
+
+The scanner and tokenizer is used to construct an input stream of tokens 
+which will be fed to the parser. It is in this stage that the preprocessing 
+is done, that all read compiler directives change the internal state 
+variables of the compiler, and that all illegal characters found in the 
+input stream cause an error.
+
+\subsection{Architecture}
+\label{subsec:architectureand}
+
+The general architecture of the scanner is show in the following diagram:
+
+\begin{figure}
+\ifpdf
+%\epsfig{file=arch2.png,width=\textwidth}
+\includegraphics{arch2.pdf}
+\else
+\includegraphics[width=5.87in,height=6.90in]{arch2.eps}
+\fi
+\caption{Possible tree Local compiler switches (tlocalswitches)}
+\label{fig2}
+\end{figure}
+
+Several types can be read from the input stream, a string, handled by
+readstring(), a numeric value, handled by readnumeric(), comments , compiler
+and preprocessor directives.
+
+\subsubsection{Input stream}
+\label{subsubsec:input}
+
+The input data is handled via the standard way of handling all the I/O in 
+the compiler. That is to say, that it is a hook which can be overriden in 
+\textbf{comphook.pas (do{\_}openinputfile)}, in case where another I/O 
+method wants to be used. 
+
+The default hook uses a non-buffered dos stream contained in 
+\textbf{files.pas}
+
+\subsubsection{Preprocessor}
+\label{subsubsec:preprocessorhook}
+
+The scanner resolves all preprocessor directives and only gives to the 
+parser the visible parts of the code (such as those which are included in 
+conditional compilation). Compiler switches and directives are also saved in 
+global variables while in the preprocessor, therefore this is part is 
+completely independent of the parser. 
+
+\paragraph{Conditional compilation (scandir.inc, scanner.pas)}
+
+The conditional compilation is handled via a preprocessor stack, where each 
+directive is pushed on a stack, and popped when it is resolved. The actual 
+implementation of the stack is a linked list of preprocessor directive 
+items.
+
+\paragraph{Compiler switches (scandir.inc, switches.pas)}
+
+The compiler switches are handled via a lookup table which is linearly 
+searched. Then another lookup table takes care of setting the appropriate 
+bit flags and variables in the switches for this compilation process.
+
+\subsection{Scanner interface}
+\label{subsec:scanner}
+
+The parser only receives tokens as its input, where a token is a enumeration 
+which indicates the type of the token, either a reserved word, a special 
+character, an operator, a numeric constant, string, or an identifier.
+
+Resolution of the string into a token is done via lookup which searches the 
+string table to find the equivalent token. This search is done using a 
+binary search algorithm through the string table.
+
+In the case of identifiers, constants (including numeric values), the value 
+is returned in the \textbf{pattern} string variable , with the appropriate 
+return value of the token (numeric values are also returned as non-converted 
+strings, with any special prefix included). In the case of operators, and 
+reserved words, only the token itself must be assumed to be preserved. The 
+read input string is assmued to be lost.
+
+Therefore the interface with the parser is with the \textbf{readtoken()} 
+routine and the \textbf{pattern} variable.
+
+\subsubsection{Routines}
+\label{subsubsec:routinese}
+
+\begin{procedure}{ReadToken}
+\Declaration
+Procedure ReadToken;
+\Description
+Sets the global variable \textsf{token} to the current token read, and sets
+the \textsf{pattern} variable appropriately (if required). 
+\end{procedure}
+
+% ?? :
+%\caption{: Symbol tables in memory}
+%\label{tab2} 
+
+\subsubsection{Variables}
+\label{subsubsec:variablesglobal}
+
+\begin{variable}{Token}
+\Description
+Var Token : TToken;
+\Description
+Contains the contain token which was last read by a call to \seep{ReadToken}
+\SeeAlso
+  \seep{ReadToken}
+\end{variable}
+
+%\caption{: Possible symbol table types (tsymboltabletype)}
+%\label{tab3}
+%\end{table}
+
+\begin{variable}{Pattern}
+\Declaration
+var Pattern : String;
+\Description
+Contains the string of the last pattern read by a call to
+\seep{ReadToken}
+\SeeAlso
+ \seep{ReadToken}
+\end{variable}
+
+%\caption{: Symbol entry relationships (tsym)}
+%\label{tab4}
+
+\subsection{Assembler parser interface}
+\label{subsec:assembler}
+
+The inline assembler parser is completely separate from the pascal parser, 
+therefore its scanning process is also completely independent. The scanner 
+only takes care of the preprocessor part and comments, all the rest is 
+passed character per character to the assembler parser via the 
+\seef{AsmGetChar}() scanner routine.
+
+\begin{function}{AsmGetChar}
+\Declaration
+Function AsmGetChar: Char;
+\Description
+Returns the next character in the input stream.  
+\end{function}
+
+%\caption{: Possible symbol types (tsymtyp)}
+%\label{tab5}
+
+\section{The tree}
+\label{sec:mylabel2}
+
+\subsection{Architecture}
+\label{subsec:architecturenext}
+
+The tree is the basis of the compiler. When the compiler parses statements
+and blocks of code, they are converted to a tree representation. This tree
+representation is actually a doubly linked list. From this tree the code
+generation can easily be implemented.
+
+Assuming that you have the following pascal syntax:
+
+\lstinline!x := x * y + (6 shl x);!
+
+The following tree structure will be built in memory, where each circle 
+represents an element (a node ) in the tree:
+
+\begin{figure}
+\ifpdf
+%\epsfig{file=arch3.png,width=\textwidth}
+\includegraphics{arch3.pdf}
+\else
+\includegraphics[width=3.88in,height=3.65in]{arch3.eps}
+\fi
+\caption{Possible variable flags (tvaroptions)}
+\label{fig3}
+\end{figure}
+
+\subsection{Tree types}
+
+The following tree nodes are possible (of type \textsf{ttreetyp):}
+
+\begin{longtable}{|l|p{10cm}|}
+%{|p{125pt}|p{316pt}|}
+\hline
+Tree type definition& 
+Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{addn}& 
+		\textsf{Represents the + operator} \\
+\textsf{muln}& 
+		\textsf{Represents the * operator} \\
+\textsf{subn}& 
+		\textsf{Represents the }\textsf{\textbf{-}}\textsf{ operator} \\
+\textsf{divn}& 
+		\textsf{Represents the }\textsf{\textbf{div}}\textsf{ operator} \\
+\textsf{symdifn}& 
+		\textsf{Represents the }\textsf{\textbf{><}}\textsf{ operator} \\
+\textsf{modn}& 
+		\textsf{Represents the }\textsf{\textbf{mod}}\textsf{ operator} \\
+\textsf{assignn}& 
+		\textsf{Represents the }\textsf{\textbf{:=}}\textsf{ operator (assignment)} \\
+\textsf{loadn}& 
+		\textsf{Represents the use of a variable} \\
+\textsf{rangen}& 
+		\textsf{Represents a numeric range (i.e 0..9)} \\
+\textsf{ltn}& 
+		\textsf{Represents the }\textsf{\textbf{<}}\textsf{ operator} \\
+\textsf{lten}& 
+		\textsf{Represents the }\textsf{\textbf{<=}}\textsf{ operator} \\
+\textsf{gtn}& 
+		\textsf{Represents the }\textsf{\textbf{>}}\textsf{ operator} \\
+\textsf{gten}& 
+		\textsf{Represents the }\textsf{\textbf{>=}}\textsf{ operator} \\
+\textsf{equaln}& 	
+		\textsf{Represents the = operator} \\
+\textsf{unequaln}& 
+		\textsf{Represents the }\textsf{\textbf{<>}}\textsf{ operator} \\
+\textsf{inn}& 
+		\textsf{Represents the }\textsf{\textbf{in}}\textsf{ operator} \\
+\textsf{orn}& 
+		\textsf{Represents the }\textsf{\textbf{or}}\textsf{ operator} \\
+\textsf{xorn}& 
+		\textsf{Represents the }\textsf{\textbf{xor}}\textsf{ operator} \\
+\textsf{shrn}& 
+		\textsf{Represents the }\textsf{\textbf{shr}}\textsf{ operator} \\
+\textsf{shln}& 
+		\textsf{Represents the }\textsf{\textbf{shl}}\textsf{ operator} \\
+\textsf{slashn}& 
+		\textsf{Represents the / operator} \\
+\textsf{andn}& 
+		\textsf{Represents the }\textsf{\textbf{and}}\textsf{ operator} \\
+\textsf{subscriptn}& 
+		\textsf{Represents a field in an object or record} \\
+\textsf{derefn}& 
+		\textsf{Represents a pointer reference (such as the }\textsf{\textbf{\ }}\textsf{ operator)} \\
+\textsf{addrn}& 
+		\textsf{Represents the }\textsf{\textbf{@}}\textsf{ operator} \\
+\textsf{doubleaddrn}& 
+		\textsf{Represents the }\textsf{\textbf{@@}}\textsf{ operator} \\
+\textsf{ordconstn}& 
+		\textsf{Represents an ordinal constant} \\
+\textsf{typeconvn}& 
+		\textsf{Represents a typecast / type conversion} \\
+\textsf{calln}& 
+		\textsf{Represents a routine call} \\
+\textsf{callparan}& 
+		\textsf{Represents a parameter passed to a routine} \\
+\textsf{realconstn}& 
+		\textsf{Represents a floating point constant} \\
+\textsf{fixconstn}& 
+		\textsf{Represents a fixed point constant} \\
+\textsf{unaryminusn}& 
+		\textsf{Represents a sign change (e.g : -)} \\
+\textsf{asmn}& 
+		\textsf{Represents an assembler statement node} \\
+\textsf{vecn}& 
+		\textsf{Represents array indexing} \\
+\textsf{pointerconstn}& 
+		\textsf{Represents a pointer constant} \\
+\textsf{stringconstn}& 
+		\textsf{Represents a string constant} \\
+\textsf{funcretn}& 
+		\textsf{Represents the return function result variable (not loadn)} \\
+\textsf{selfn}& 
+		\textsf{Represents the self parameter (when is this parsed!)} \\
+\textsf{notn}& 
+		\textsf{Represents the }\textsf{\textbf{not}}\textsf{ operator} \\
+\textsf{inlinen}& 
+		\textsf{Represents one of the internal routines (writeln,ord, etc.)} \\
+\textsf{niln}& 
+		\textsf{Represents the }\textsf{\textbf{nil}}\textsf{ pointer } \\
+\textsf{erron}& 
+		\textsf{Represents error in parsing this node (used for error detection and correction)} \\
+\textsf{typen}& 
+		\textsf{Represents a type name (i.e typeof(obj)} \\
+\textsf{hnewn}& 
+		\textsf{Represents the }\textsf{\textbf{new }}\textsf{routine call on objects} \\
+\textsf{hdisposen}& 
+		\textsf{Represents the }\textsf{\textbf{dispose}}\textsf{ routine call on objects} \\
+\textsf{newn}& 
+		\textsf{Represents the }\textsf{\textbf{new}}\textsf{ routine call on non-objects} \\
+\textsf{simpledisposen}& 
+		\textsf{Represents the }\textsf{\textbf{dispose}}\textsf{ routine call on non-objects} \\
+\textsf{setelementn}& 
+		\textsf{Represents set elements (i.e : [a..b], [a,b,c]) (non-constant)} \\
+\textsf{setconstn}& 
+		\textsf{Represents set element constants i.e : [1..9], [1,2,3])} \\
+\textsf{blockn}& 
+		\textsf{Represents a block of statements} \\
+\textsf{statementn}& 
+		\textsf{One statement in a block of nodes} \\
+\textsf{loopn}& 
+		\textsf{Represents a loop (for, while, repeat) node} \\
+\textsf{ifn}& 
+		\textsf{Represents an }\textsf{\textbf{if}}\textsf{ statement} \\
+\textsf{breakn}& 
+		\textsf{Represents a }\textsf{\textbf{break}}\textsf{ statement} \\
+\textsf{continuen}& 
+		\textsf{Represents a }\textsf{\textbf{continue}}\textsf{ statement} \\
+\textsf{repeatn}& 
+		\textsf{Represents a }\textsf{\textbf{repeat }}\textsf{statement} \\
+\textsf{whilen}& 
+		\textsf{Represents a }\textsf{\textbf{while}}\textsf{ statement} \\
+\textsf{forn}& 
+		\textsf{Represents a }\textsf{\textbf{for}}\textsf{ statement} \\
+\textsf{exitn}& 
+		\textsf{Represents an }\textsf{\textbf{exit}}\textsf{ statement} \\
+\textsf{withn}& 
+		\textsf{Represents a }\textsf{\textbf{with}}\textsf{ statement} \\
+\textsf{casen}& 
+		\textsf{Represents a }\textsf{\textbf{case}}\textsf{ statement} \\
+\textsf{labeln}& 
+		\textsf{Represents a label statement} \\
+\textsf{goton}& 
+		\textsf{Represents a }\textsf{\textbf{goto}}\textsf{ statement} \\
+\textsf{simplenewn}& 
+		\textsf{Represents a }\textsf{\textbf{new}}\textsf{ statement } \\
+\textsf{tryexceptn}& 
+		\textsf{Represents a }\textsf{\textbf{try}}\textsf{ statement} \\
+\textsf{raisen}& 
+		\textsf{Represents a }\textsf{\textbf{raise}}\textsf{ statement} \\
+\textsf{\textit{switchesn}}& 
+		\textsf{\textit{Unused}} \\
+\textsf{tryfinallyn}& 
+		\textsf{Represents a }\textsf{\textbf{try..finally}}\textsf{ statement} \\
+\textsf{onn}& 
+		\textsf{Represents an }\textsf{\textbf{on..do}}\textsf{ statement} \\
+\textsf{isn}& 
+		\textsf{Represents the }\textsf{\textbf{is}}\textsf{ operator} \\
+\textsf{asn}& 
+		\textsf{Represents the }\textsf{\textbf{as}}\textsf{ typecast operator} \\
+\textsf{caretn}& 
+		\textsf{Represents the \  operator} \\
+\textsf{failn}& 
+		\textsf{Represents the }\textsf{\textbf{fail}}\textsf{ statement} \\
+\textsf{starstarn}& 
+		\textsf{Represents the }\textsf{\textbf{**}}\textsf{ operator (exponentiation)} \\
+\textsf{procinlinen}& 
+		\textsf{Represents an }\textsf{\textbf{inline}}\textsf{ routine} \\
+\textsf{arrayconstrucn}& 
+		\textsf{Represents a }\textsf{\textbf{[..]}}\textsf{ statement (array or sets)} \\
+\textsf{arrayconstructrangen}& 
+		\textsf{Represents ranges in [..] statements (array or sets)} \\
+\textsf{nothingn}& 
+		\textsf{Empty node} \\
+\textsf{loadvmtn}& 
+		\textsf{Load method table register} \\
+\hline
+%\end{tabular}
+\caption{: Possible parameter types (tvarspez)}
+\label{tab6}
+\end{longtable}
+
+\subsection{Tree structure fields (tree.pas)}
+\label{subsec:mylabel2}
+
+Each element in a node is a pointer to a ttree structure, which is summarily 
+explained and defined as follows:
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{8.5cm}|}
+\hline
+\textsf{TYPE}& & \\
+\xspace pTree = & \^{}  Tree; & \\
+\xspace \textsf{TTree} = & \textbf{RECORD}& \\
+ & \textsf{error : boolean;}&  \\
+ &\textsf{disposetyp : tdisposetyp;}& 
+ \\
+ &\textsf{swaped : boolean;}& 
+Set to TRUE if the left and right nodes (fields) of this node have been swaped. \\
+ & \textsf{varstateset : boolean;}& 
+ \\
+ & \textsf{location : tlocation;}& 
+Location information for this information (cf. Code generator) \\
+ & \textsf{registers32 : longint;}& 
+Number of general purpose registers required to evaluate this node \\
+ & \textsf{registersfpu : longint;}& 
+Number of floating point registers required to evaluate this node \\
+ & \textsf{left : ptree;}& 
+LEFT leaf of this node \\
+ & \textsf{right : ptree;}& 
+RIGHT leaf of this node \\
+ & \textsf{resulttype : pdef;}& 
+Result type of this node  \par (cf. Type definitions) \\
+ & \textsf{fileinfo : tfileposinfo;}& 
+Line number information for this node creation in the original source code (for error management) \\
+ & \textsf{localswitches : tlocalswitches;}& 
+Local compiler switches used for code generation \par (Cf. \ref{fig1}) \\
+ & \textsf{isproperty : boolean;}& 
+TRUE if this is a property \\
+ & \textsf{treetype : ttreetyp;}& 
+Type of this tree (cf. \ref{tab1}) \\
+ & \textsf{END;}&   \\
+\hline
+\end{tabular*}
+%\caption{: possible definition types (tdeftype)}
+
+\begin{longtable}{|l|l|p{10cm}|}
+% p{126pt}|p{45pt}|p{319pt}|}
+\hline
+tlocalswitches & Switch & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{cs{\_}check{\_}overflow} 	&  {\{}{\$}Q+{\}}& 
+Code generator should emit overflow checking code  \\
+\textsf{cs{\_}check{\_}range}    	&  {\{}{\$}R+{\}}& 
+Code generator should emit range checking code  \\
+\textsf{cs{\_}check{\_}io} 	 	&  {\{}{\$}I+{\}}& 
+Code generator should emit I/O checking code \\
+\textsf{cs{\_}check{\_}object{\_}ext} 	&  N/A& 
+Code generator should emit extended object access checks \\
+\textsf{\textit{cs{\_}omitstackframe}}	&  $N/A$ & 
+\textit{Code generator should not emit frame{\_}pointer setup code in entry code} \\
+\textsf{cs{\_}do{\_}assertion}		& {\{}{\$}C+{\}} &  
+Code generator supports using the assert inline routine \\
+\textsf{cs{\_}generate{\_}rtti} 	& {\{}{\$}M+{\}} & 
+Code generator should emit runtime type information \\
+\textsf{cs{\_}typed{\_}addresses} 	& {\{}{\$}T+{\}}& 
+Parser emits typed pointer using the @ operator  \\
+\textsf{cs{\_}ansistrings}		& {\{}{\$}H+{\}}& 
+Parser creates an \textsf{ansistring} when an unspecified \textsf{string} type is declared instead of the default \textsf{shortstring} \\
+\textsf{cs{\_}strict{\_}var{\_}strings} & {\{}{\$}V+{\}}& 
+String types must be identical (same length) to be compatible \\
+\hline
+\caption{object definition flags (tobjectoptions)}
+\label{tab8}
+\end{longtable}
+
+\subsubsection{Additional fields}
+\label{subsubsec:additional}
+
+Depending on the tree type, some additional fields may be present in the 
+tree node. This section describes these additional fields. Before accessing 
+these additional fields, a check on the \textsf{treetype} should always be 
+done to verify if not reading invalid memory ranges.
+
+\paragraph{addn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{\textit{use{\_}strconcat : boolean;}}& 
+\textit{Currently unused (use for optimizations in future versions)} \\
+\hline
+\textsf{string{\_}typ: tstringtype;}& 
+In the case where the + operator is applied on a string, this field indicates the string type. \\
+\hline
+\caption{: Ordinal types (tbasetype)}
+\label{tab9}
+\end{longtable}
+
+\paragraph{callparan}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{is{\_}colon{\_}para : boolean;}& 
+Used for internal routines which can use optional format parameters (using colons). Is set to TRUE if this parameter was preceded by a colon (i.e : :1) \\
+\textsf{exact{\_}match{\_}found : boolean;}& 
+Set to TRUE if the parameter type is exactly the same as the one expected by the routine. \\
+\textsf{convlevel1found : boolean;}& 
+Set to TRUE if the parameter type requires a level 1 type conversion to conform to the parameter expected by the routine. \\
+\textsf{convlevel2found : boolean;}& 
+Set to TRUE if the parameter type requires a level 2 type conversion to conform to the parameter expected by the routine. \\
+\textsf{hightree : ptree;}&  \\
+\hline
+\caption{Floating point types (tfloattype)}
+\label{tab10}
+\end{longtable}
+
+\paragraph{assignn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{\textit{assigntyp : tassigntyp;}}& 
+\textit{Currently unused (Used to be used for C-like assigns)} \\
+\textsf{\textit{concat{\_}string : boolean;}}& 
+\textit{Currently unused (use for optimizations in future versions)}\\
+\hline
+\caption{Routine type information (tproctypeoption)}
+\end{longtable}
+
+\paragraph{loadn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{symtableentry : psym;}& 
+Symbol table entry for this symbol \\
+\textsf{symtable : psymtable;}& 
+Symbol table in which this symbol is stored \\
+\textsf{is{\_}absolute : boolean;}& 
+set to TRUE if this variable is absolute \\
+\textsf{is{\_}first : boolean;}& 
+set to TRUE if this is the first occurrence of the load for this variable (used with the varstate variable for optimizations) \\
+\hline
+\caption{: Routine calling convention information (tproccalloptions)}
+\label{tab12}
+\end{longtable}
+
+\paragraph{calln}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{symtableprocentry : pprocsym;}& 
+Symbol table entry for this routine \\
+\textsf{symtableproc : psymtable;}& 
+Symbol table associated with a call (object symbol table or routine symbol table) \\
+\textsf{procdefinition : pabstractprocdef;}& 
+Type definition for this routine \\
+\textsf{methodpointer : ptree;}& 
+????????? \\
+\textsf{\textit{no{\_}check : boolean;}}& 
+\textit{Currently unused} \\
+\textsf{unit{\_}specific : boolean;}& 
+set to TRUE if the routine is imported in a unit specific way (for example: system.writeln()) \\
+\textsf{return{\_}value{\_}used : boolean}& 
+set to TRUE if the routine is a function and that the return value is not used (in extended syntax parsing - {\$}X+) \\
+\textsf{\textit{static{\_}call : boolean;}}& 
+\textit{unused} \\
+\hline
+\caption{: Routine options (tprocoptions)}
+\label{tab13}
+\end{longtable}
+
+\paragraph{addrn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{procvarload : boolean;}& 
+set to TRUE if this is a procedural variable call \\
+\hline
+\caption{: string types (tstringtype)}
+\end{longtable}
+
+\paragraph{ordconstn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{value : longint;}& 
+The numeric value of this constant node \\
+\hline
+\caption{: Possible set types (tsettype)}
+\end{longtable}
+
+\paragraph{realconstn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{value{\_}real : best{\_}real;}& 
+The numeric value of this constant node \\
+\textsf{lab{\_}real : pasmlabel;}& 
+The assembler label reference to this constant \\
+\hline
+\caption{: Code generator operand sizes}\label{tab16}
+\end{longtable}
+
+\paragraph{fixconstn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{value{\_}fix : longint;}& 
+The numeric value of this constant node \\
+\hline
+\caption{: Required target processor when compiling}
+\label{tab17}
+\end{longtable}
+
+\paragraph{funcretn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{funcretprocinfo : pointer; (pprocinfo)}& 
+Pointer to procedure information  \\
+\textsf{rettype : ttype;}& Indicates the return type of the function \\
+\textsf{is{\_}first{\_}funcret : boolean;}&  \\
+\hline
+\caption{General defines for compiling system unit}
+\label{tab18}
+\end{longtable}
+
+\paragraph{subscriptn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{vs : pvarsym;}& 
+Symbol table entry for this variable (a field of object/class/record) \\
+\hline
+\caption{Debugging defines when compiling system unit}
+\end{longtable}
+
+\paragraph{raisen}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{frametree : ptree;}& Exception frame tree (code in raise statement) 
+\end{longtable}
+
+\paragraph{vecn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{memindex : boolean;} & Set to TRUE if Mem[Seg:Ofs] directive is parsed \\
+\textsf{memseg : boolean;}   & Set to TRUE if Mem[Seg:Ofs] directive is parsed \\
+\textsf{callunique : boolean;}& 
+\label{tab21}
+\end{longtable}
+
+\paragraph{stringconstn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{value{\_}str : pchar;}    & The constant value of the string \\
+\textsf{length : longint;}	  & Length of the string in bytes (or in characters???) \\
+\textsf{lab{\_}str : pasmlabel;}  & The assembler label reference to this constant \\
+\textsf{stringtype : tstringtype;}& The string type (short, long, ansi, wide) 
+\label{tab22}
+\end{longtable}
+
+\paragraph{typeconvn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{convtype: tconverttype;}& Indicates the conversion type to do \\
+\textsf{explizit : boolean;}& 
+set to TRUE if this was an explicit conversion (with explicit typecast, 
+or calling one of the internal conversion routines) 
+\label{tab23}
+\end{longtable}
+
+\paragraph{typen}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{typenodetype : pdef;}&  \\
+\textsf{typenodesym : ptypesym;}&  
+\label{tab24}
+\end{longtable}
+
+\paragraph{inlinen}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{inlinenumber: byte;}    &  Indicates the internal routine called (Cgf. code generator) \\
+\textsf{inlineconst : boolean;} & 
+One or more of the parameters to this inline routine call contains constant values 
+\label{tab25}
+\end{longtable}
+
+\paragraph{procinlinen}\mbox{}
+
+Inline nodes are created when a routine is declared as being inline. The 
+routine is actually inlined when the following conditions are satisfied:
+
+It is called within the same module
+
+The appropriate compiler switch to support inline is activated
+
+It is a non-method routine (a standard procedure or function)
+
+Otherwise a normal call is made, ignoring the inline directive. In the case 
+where a routine is inlined, all parameters , return values and local 
+variables of the inlined routine are actually allocated in the stack space 
+of the routine which called the inline routine.
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{inlinetree : ptree;}& 
+The complete tree for this inline procedure \\
+\textsf{inlineprocsym : pprocsym;}& 
+Symbol table entry for this procedure \\
+\textsf{retoffset : longint;}& 
+Return offset in parent routine stack space \\
+\textsf{para{\_}offset : longint;}& 
+Parameter start offset in parent routine stack space \\
+\textsf{para{\_}size : longint;}& 
+Parameter size in the parent routine stack space 
+\label{tab26}
+\end{longtable}
+
+\paragraph{setconstn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{value{\_}set : pconstset;}& The numeric value of this constant node \\
+\textsf{lab{\_}set : pasmlabel;}& The assembler label reference to this constant 
+\label{tab27}
+\end{longtable}
+
+\paragraph{loopn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+  &  \\
+  &  \\
+  &  
+\end{longtable}
+
+\paragraph{asmn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{p{\_}asm : paasmoutput;}& 
+The instruction tree created by the assembler parser \\
+\textsf{object{\_}preserved : boolean;}& 
+set to FALSE if the self{\_}register was modified in the asm statement.  
+\label{tab29}
+\end{longtable}
+
+\paragraph{casen}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{nodes : pcaserecord;}& 
+Tree for each of the possible case in the case statement \\
+\textsf{elseblock : ptree;}& 
+Else statement block tree 
+\label{tab30}
+\end{longtable}
+
+\paragraph{labeln, goton}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{labelnr : pasmlabel;}   & Assembler label associated with this statement \\
+\textsf{exceptionblock : ptree;}& ???????? \\
+\textsf{labsym : plabelsym;}    & Symbol table entry for this label 
+\label{tab31}
+\end{longtable}
+
+\paragraph{withn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{withsymtables : pwithsymtable;} &  \\
+\textsf{tablecount : longint;}		&  \\
+\textsf{withreference : preference;}	&  \\
+\textsf{islocal : boolean;}		&  
+\label{tab32}
+\end{longtable}
+
+\paragraph{onn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{exceptsymtable : psymtable;}&  \\
+\textsf{excepttype : pobjectdef;}&  
+\label{tab33}
+\end{longtable}
+
+\paragraph{arrayconstructorn}\mbox{}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{cargs : boolean;}		&  \\
+\textsf{cargswap : boolean;}		&  \\
+\textsf{forcevaria : boolean;}		&  \\
+\textsf{novariaallowed : boolean;}	&  \\
+\textsf{constructordef : pdef;}		&  
+\label{tab34}
+\end{longtable}
+
+\section{Symbol tables}
+\label{sec:symbol}
+
+\subsection{Architecture}
+\label{subsec:architecturesructord}
+
+The symbol table contains all definitions for all symbols in the compiler. 
+It also contains all type 
+
+\noindent
+information for all symbols encountered during the parsing process. All 
+symbols and definitions are streamable, and are used within PPU files to 
+avoid recompiling everything to verify if all symbols are valid.
+
+There are different types of symbol tables, all of which maybe active at one 
+time or another depending on the context of the parser. 
+
+An architectural overview of the interaction between the symbol tables, the 
+symbol entries and the definition entries is as follows:
+
+\begin{figure}
+\ifpdf
+\includegraphics{arch4.pdf}
+%\epsfig{file=arch4.png,width=\textwidth}
+\else
+\includegraphics[width=6.29in,height=3.29in]{arch4.eps}
+\fi
+\label{fig4}
+\caption{Interactions between symbol tables}
+\end{figure}
+
+As can be seen, the symbol table entries in the symbol table are done using 
+the fast hashing algorithm with a hash dictionary.
+
+\subsection{The Symbol table object}
+\label{subsec:mylabel3}
+
+All symbol tables in the compiler are from this type of object, which 
+contains fields for the total size of the data in the symbol table, and 
+methods to read and write the symbol table into a stream. The start of the 
+linked list of active symbol tables is the \textbf{symtablestack} variable.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{6,5cm}|}
+\hline
+\textsf{TYPE} & & \\
+\xspace \textsf{pSymTable} &= \^{} \textbf{TSymTable};&  \\
+\xspace \textsf{TSymTable} &= \textbf{object} & \\
+& \textsf{name : pstring;}& \\
+& \textsf{datasize : longint;}& 
+	The total size of all the data in this symbol table (after the data has been aligned). Only valid for certain types of symbol tables. \\
+& \textsf{dataalignment : longint;}& \\ 
+& \textsf{symindex : pindexarray;}& \\
+& \textsf{defindex : pindexarray;}&  \\
+& \textsf{symsearch : pdictionary;}& \\
+& \textsf{next : psymtable;}& 
+	Points to the next symbol table in the linked list of active symbol tables. \\
+& \textsf{defowner : pdef;}& 
+	The owner definition (only valid in the cases of objects and records, this points to the definition of that object or record). \\
+& \textsf{address{\_}fixup : longint}&  \\
+& \textsf{unitid : word;}&  \\
+& \textsf{symtablelevel : byte;}&  \\
+& \textsf{symtabletype :tsymtabletype;}& 
+	Indicates the type of this symbol table (\ref{fig2}). \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+The type of possible symbol tables are shown in the following diagram:
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+field	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+tsymtabletype& Description \\
+\textsf{invalidsymtable}& 
+	Default value when the symbol table is created and its type is not defined. Used for debugging purposes \\
+\textsf{withsymtable}& 
+	All symbols accessed in a with statement \\
+\textsf{staticsymtable}&  \\
+\textsf{globalsymtable}&  \\
+\textsf{unitsymtable}& 
+	Linked list of units symbol used (all or unit?). The linked list is composed of \textsf{tunitsym} structures. \\
+\textsf{objectsymtable}&  \\
+\textsf{recordsymtable}& 
+	Contains all symbols within a record statement \\
+\textsf{macrosymtable}& 
+	Holds all macros currently in scope. \\
+\textsf{localsymtable}& 
+	Hold symbols for all local variables of a routine \\
+\textsf{parasymtable}& 
+	Holds symbols for all parameters of a routine (the actual parameter declaration symbols) \\
+\textsf{inlineparasymtable}& 
+	Holds all parameter symbols for the current inline routine \\
+\textsf{inlinelocalsymtable}& 
+	Holds all local symbols for the current inline routine \\
+\textsf{stt{\_}exceptsymtable}&  \\
+\textsf{staticppusymtable}&  
+\label{tab36}
+\end{longtable}
+
+\subsection{Inserting symbols into a symbol table}
+\label{subsec:inserting}
+
+To add a symbol into a specific symbol table, that's symbol table's 
+\textsf{insert} method is called, which in turns call the 
+\textsf{insert{\_}in{\_}data} method of that symbol. 
+\textsf{insert{\_}in{\_}data}, depending on the symbol type, adjusts the 
+alignment and sizes of the data and actually creates the data entry in the 
+correct segment.
+
+\begin{figure}
+\ifpdf
+%\epsfig{file=arch5.png,width=\textwidth}
+\includegraphics{arch5.pdf}
+\else
+\includegraphics[width=1.51in,height=5.51in]{arch5.eps}
+\fi
+\label{fig5}
+\caption{pic5 Inserting into the tree}
+\end{figure}
+
+\subsection{Symbol table interface}
+
+\subsubsection{Routines}
+\label{subsubsec:routinesable}
+
+\begin{functionl}{Search{\_}a{\_}Symtable}{searchasymtable}
+\Declaration
+Function Search{\_}a{\_}Symtable(Const Symbol:String;SymTableType:TSymTableType):pSym;
+\Description
+Search for a symbol \textsf{Symbol} in a specified symbol table
+\textsf{SymTableType}. Returns \textsf{NIL} if the symbol table is not
+found, and also if the symbol cannot be found in the desired symbol table.
+\end{functionl}
+
+\begin{procedure}{GetSym}
+\Declaration
+Procedure GetSym(Const S : StringId; NotFoundError: Boolean);
+\Description
+Search all the active symbol tables for the symbol \textsf{s},setting the
+global variable \textsf{SrSym} to the found symbol, or to \textsf{nil} if
+the symbol was not found. \textsf{notfounderror} should be set to TRUE if
+the routine must give out an error when the symbol is not found.
+\end{procedure}
+
+\begin{function}{GlobalDef}
+\Declaration
+Function GlobalDef(Const S : String) : pDef;
+\Description
+Returns a pointer to the definition of the fully qualified type symbol
+\textsf{S}, or \textsf{NIL} if not found.
+\Notes
+It is fully qualified, in that the symbol \textsf{system.byte}, for example,
+will be fully resolved to a unit and byte type component The symbol must
+have a global scope, and it must be a type symbol, otherwise \textsf{NIL}
+will be returned..
+\end{function}
+
+\subsubsection{Variables}
+\label{subsubsec:variablesly}
+
+\begin{variable}{SrSym}
+\Declaration
+Var SrSym : pSym;
+\Description
+This points to the symbol entry found, when calling \textsf{getsym}. 
+\end{variable}
+
+\begin{variable}{SrSymTable}
+\Declaration
+Var SrSymTable : pSymTable;
+\Description
+This points to the symbol table of the symbol \seevar{SrSym} when calling
+\seep{GetSym}. 
+\end{variable}
+
+\section{Symbol entries}
+\label{sec:mylabel3}
+
+\subsection{Architecture}
+\label{subsec:architecturees}
+
+There are different possible types of symbols, each one having different
+fields then the others. Each symbol type has a specific signature to
+indicate what kind of entry it is. Each entry in the symbol table is
+actually one of the symbol entries described in the following sections. The
+relationship between a symbol entry, a type definition, and the type name
+symbol entry is shown in the following diagram:
+
+\begin{figure}
+\ifpdf
+\includegraphics{arch6.pdf}
+%\epsfig{file=arch6.png,width=\textwidth}
+\else
+\includegraphics[width=5.51in,height=4.51in]{arch6.eps}
+\fi
+\label{fig6}
+\caption{relation between symbol entry and type definition and name}
+\end{figure}
+
+\subsection{Symbol entry types}
+\label{subsec:symbol}
+
+\subsubsection{base symbol type (tsym)}
+\label{subsubsec:mylabel1}
+
+All entries in the symbol table are derived from this base object which 
+contains information on the symbol type as well as information on the owner 
+of this symbol entry.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE} & &  \\
+\xspace pSym = & \^{}  TSym; & \\
+\xspace \textsf{TSym} = & \textbf{Object}(TSymTableEntry) & \\
+& \textsf{symoptions : tsymoptions;}& Indicate the access scope of the symbol \\
+&\ textsf{fileinfo : tfileposinfo;}&  \\
+& \textsf{refs : longint;}& 
+	Indicates how many times this label is refered in the parsed code (is only used with variable and assembler label symbols). \\
+&\textsf{lastref : pref;}&  \\
+&\textsf{defref : pref;}&  \\
+&\textsf{lastwritten : pref;}& \\
+&\textsf{refcount : longint;}& \\
+&\textsf{typ : tsymtyp;}& Indicates the symbol type (Cf. \ref{tab2}(. \\
+&\textsf{isstabwritten : boolean;}& \\
+&\textsf{end; }&\\
+\hline  
+\end{tabular*}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+TSymTyp	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{abstractsym}& 
+	This is a special abstract symbol (this should never occur) \\
+\textsf{varsym}& 
+	This symbol is a variable declaration in the \textsf{var} section, or a \textsf{var} parameter. \\
+\textsf{typesym}& 
+	This symbol is a type name \\
+\textsf{procsym}& 
+	This symbol is a routine or method name \\
+\textsf{unitsym}& 
+	This symbol is a unit name \\
+\textsf{\textit{programsym}}& 
+	\textit{This symbol is the main program name} \\
+\textsf{constsym}& 
+	This symbol is a constant \\
+\textsf{enumsym}& 
+	This symbol is an enumeration symbol (an element in an enumeration) \\
+\textsf{typedconstsym}& 
+	This symbol is pre-initialized variable (pascal typed constant) \\
+\textsf{errorsym}& 
+	This symbol is created for error generation \\
+\textsf{syssym}& 
+	This symbol represents an inlined system unit routine \\
+\textsf{labelsym}& 
+	This symbol represents a label in a \textsf{label} pascal declaration \\
+\textsf{absolutesym}& 
+	This symbol represents an the symbol following an \textsf{absolute} variable declaration \\
+\textsf{propertysym}& 
+	This symbol is a property name \\
+\textsf{funcretsym}& 
+	This symbol is the name of the return value for functions \\
+\textsf{macrosym}& 
+	This symbol is a macro symbol (just like {\#}define in C) 
+\end{longtable}
+
+\subsubsection{label symbol (tlabelsym)}
+\label{subsubsec:label}
+
+The label symbol table entry is only created when a pascal label is declared 
+via the label keyword. The object has the following fields which are 
+available for use publicly:
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE} & &  \\
+\xspace pLabelSym = & \^{}  TLabelSym; & \\
+\xspace \textsf{TLabelSym} = & \textbf{Object}(TSym) & \\
+& \textsf{used : boolean}& 
+	Set to TRUE if this pascal label is used using a \textsf{goto} or in an assembler statement \\
+& \textsf{defined: boolean}& 
+	Set to TRUE if this label has been declared \\
+& \textsf{lab : pasmlabel}& 
+	Points to the actual assembler label structure which will be emitted by the code generator \\
+& \textsf{code : pointer}&  \\
+& \textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{unit symbol (tunitsym)}
+\label{subsubsec:mylabel2}
+
+The unit symbol is created and added to the symbol table each time that the 
+uses clause is parsed and a unit name is found, it is also used when 
+compiling a unit, with the first entry in that symbol table being the unit 
+name being compiled. The unit symbol entry is actual part of a linked list 
+which is used in the unit symbol table.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{7cm}|}
+\hline
+\textsf{TYPE} & & \\
+\xspace pUnitSym = & \^{}  TUnitSym; & \\
+\xspace \textsf{TUnitSym} = & \textbf{Object}(TSym) & \\
+& \textsf{unitsymtable:punitsymtable}& 
+	Pointer to the global symbol table for that unit, containing entries for each public? symbol in that unit \\
+& \textsf{prevsym : punitsym}& 
+	Pointer to previous entry in the linked list \\
+& \textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{macro symbol (tmacrosym)}
+\label{subsubsec:macro}
+
+The macro synbols are used in the preprocessor for conditional compilation 
+statements. There is one such entry created for each {\$}define directive, 
+it contains the value of the define (stored as a string).
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{6cm}|}
+\hline
+\textsf{TYPE}& & \\
+\xspace pMacroSym = & \^{}  TMacroSym; & \\
+\xspace \textsf{TMacroSym} = & \textbf{Object}(TSym) & \\
+& \textsf{defined : boolean;}& 
+	TRUE if the symbol has been defined with a \textsf{{\$}define}
+	directive, or false if it has been undefined with a
+	\textsf{{\$}undef} directive \\
+& \textsf{defined{\_}at{\_}startup : boolean;}& 
+	TRUE if the symbol is a system wide define \\
+& \textsf{is{\_}used: boolean;}& 
+	TRUE if the define has been used such as in a \textsf{{\$}ifdef}
+	directive. \\
+& \textsf{buftext : pchar;}& 
+	The actual string text of the define \\
+& \textsf{buflength : longint;}& 
+	The actual string length of the define \\
+& \textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{error symbol (terrorsym)}
+\label{subsubsec:error}
+
+This symbol is actually an empty symbol table entry. When the parser 
+encounters an error when parsing a symbol, instead of putting nothing in the 
+symbol table, it puts this symbol entry. This avoids illegal memory accesses 
+later in parsing.
+
+\subsubsection{procedure symbol (tprocsym)}
+\label{subsubsec:procedure}
+
+The procedure symbol is created each time a routine is defined in the code. 
+This can be either a forward definition or the actual implementation of the 
+routine. After creation, the symbol is added into the appropriate symbol 
+table stack.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{8cm}|}
+\hline
+\textsf{TYPE}& & \\
+\xspace pProcSym = & \^{}  TProcSym; & \\
+\xspace \textsf{TProcSym} = & \textbf{Object}(TSym) & \\
+& \textsf{is{\_}global : boolean}& 
+	Set if the routine is exported by the unit \\
+& \textsf{definition : pprocdef}& 
+	Procedure definition, including parameter information and return
+	values \\
+& \textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{type symbol (ttypesym)}
+\label{subsubsec:mylabel3}
+
+The type symbol is created each time a new type declaration is done, the 
+current symbol table stack is then inserted with this symbol. Furthermore, 
+each time the compiler compiles a module, the default base types are 
+initialized and added into the symbol table (\textbf{psystem.pas}) The type 
+symbol contains the name of a type, as well as a pointer to its type 
+definition.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE}& &  \\
+\xspace pTypeSym = & \^{}  TTypeSym; & \\
+\xspace \textsf{TTypeSym} = & \textbf{Object}(TSym) & \\
+& \textsf{restype : ttype}& 
+	Contains base type information as well as the type definition \\
+& \textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{variable symbol (tvarsym)}
+\label{subsubsec:variable}
+
+Variable declarations, as well as parameters which are passed onto routines 
+are declared as variable symbol types. Access information, as well as type 
+information and optimization information are stored in this symbol type.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE}& & \\
+\xspace pVarSym = & \^{}  TVarSym; & \\
+\xspace \textsf{TVarSym} = & \textbf{Object}(TSym) & \\
+& \textsf{reg: tregister;}& 
+	If the value is a register variable, the \textsf{reg} field will be
+	different then R{\_}NO \\
+& \textsf{varspez : tvarspez;}& 
+	Indicates the variable type (parameters only) (Cf. \ref{tab4}). \\
+& \textsf{address : longint;}& 
+	In the case where the variable is a routine parameter, this
+	indicates the positive offset from the \textsf{frame{\_}pointer }to
+	access this variable. In the case of a local variable, this field
+	indicates the negative offset from the \textsf{frame{\_}pointer}. to
+	access this variable. \\
+& \textsf{localvarsym : pvarsym;}&  \\
+& \textsf{vartype : ttype;}& 
+	Contains base type information as well as the type definition \\
+& \textsf{varoptions : tvaroptions;}& 
+	Flags for this variable (Cf. \ref{tab3}) \\
+& \textsf{varstate : tvarstate}& 
+	Indicates the state of the variable, if it's used or declared \\
+& \textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+TVarOptions & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{vo{\_}regable}& 
+	The variable can be put into a hardware general purpose register \\
+\textsf{vo{\_}is{\_}C{\_}var}& 
+	The variable is imported from a C module \\
+\textsf{vo{\_}is{\_}external}& 
+	The variable is declared external \\
+\textsf{vo{\_}is{\_}dll{\_}var}& 
+	The variable is a shared library variable \\
+\textsf{vo{\_}is{\_}thread{\_}var}& 
+	The variable is declared as being thread safe \\
+\textsf{vo{\_}fpuregable}& 
+	The variable can be put into a hardware floating point register \\
+\textsf{vo{\_}is{\_}local{\_}copy}&  \\
+\textsf{\textit{vo{\_}is{\_}const}}& 
+	\textit{unused and useless} \\
+\textsf{vo{\_}is{\_}exported}& 
+	The variable is declared as exported in a dynamic link library  
+\end{longtable}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+TVarSpez & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{vs{\_}value}& 
+	This is a value parameter \\
+\textsf{vs{\_}const}& 
+	This is a constant parameter, property or array \\
+\textsf{vs{\_}var}& 
+	This is a variable parameter 
+\end{longtable}
+
+\subsubsection{property symbol}
+\label{subsubsec:property}
+
+\subsubsection{return value of function symbol}
+\label{subsubsec:return}
+
+\subsubsection{absolute declared variable}
+\label{subsubsec:absolute}
+
+\subsubsection{typed constant symbol}
+\label{subsubsec:typed}
+
+\subsubsection{constant symbol}
+\label{subsubsec:constant}
+
+\subsubsection{enumeration symbol}
+\label{subsubsec:enumeration}
+
+\subsubsection{program symbol}
+\label{subsubsec:program}
+
+\subsubsection{sys symbol}
+\label{subsubsec:mylabel4}
+
+\subsection{Symbol interface}
+\label{subsec:mylabel5}
+
+\section{Type information}
+\label{sec:mylabel4}
+
+\subsection{Architecture}
+\label{subsec:architecturetionolbo}
+
+A type declaration , which is the basis for the symbol table, since 
+inherently everything comes down to a type after parsing is a special 
+structure with two principal fields, which point to a symbol table entry 
+which is the type name, and the actual definition which gives the 
+information on other symbols in the type, the size of the type and other 
+such information.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE} & &  \\
+\xspace \textsf{TType} = & \textbf{Object} & \\
+&\textsf{sym : psym;}& 
+	Points to the symbol table of this type \\
+& \textsf{def : pdef;}& 
+	Points to the actual definition of this type \\
+&\textsf{end;}&   \\
+\hline
+\end{tabular*}
+
+\begin{figure}
+\ifpdf
+\includegraphics{arch7.pdf}
+%\epsfig{file=arch7.png,width=\textwidth}
+\else
+\includegraphics[width=4.39in,height=3.56in]{arch7.eps}
+\fi
+\caption{Type symbol and definition relations}
+\label{fig7}
+
+\end{figure}
+
+\subsection{Definition types}
+
+Definitions represent the type information for all possible symbols which 
+can be encountered by the parser. The definition types are associated with 
+symbols in the symbol table, and are used by the parsing process (among 
+other things) to perform type checking.
+
+The current possible definition types are enumerated in \textsf{tdeftype 
+}and can have one of the following symbolic values:
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+deftype of tdef object	& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{abstractdef}	&  \\
+\textsf{arraydef}	& array type definition \\
+\textsf{recorddef}	& record type definition \\
+\textsf{pointerdef}	& pointer type definition \\
+\textsf{orddef}		& ordinal (numeric value) type definition \\
+\textsf{stringdef}	& string type definition \\
+\textsf{enumdef}	& enumeration type definition \\
+\textsf{procdef}	& procedure type definition \\
+\textsf{objectdef}	& object or class type definition \\
+\textsf{errordef}	& error definition (empty, used for error recovery) \\
+\textsf{filedef}	& file type definition \\
+\textsf{formaldef}	&  \\
+\textsf{setdef}		& set type definition \\
+\textsf{procvardef}	& procedure variable type definition \\
+\textsf{floatdef}	& floating point type definition \\
+\textsf{classrefdef}	&  \\
+\textsf{forwarddef}	&  \\
+\end{longtable}
+
+\subsubsection{base definition (tdef)}
+\label{subsubsec:mylabel5}
+
+All type definitions are based on this object. Therefore all derived object 
+all posess the fields in this object in addition to their own private 
+fields.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{7cm}|}
+\hline
+\textsf{TYPE} & & \\
+\xspace pDef = & \^{}  TDef; & \\
+\xspace \textsf{TDef} = & \textbf{Object}(TSymTableEntry) & \\
+&\textsf{typesym : ptypesym;}& 
+	Pointer to symbol table entry for this type definition \\
+&\textsf{inittable{\_}label : pasmlabel;}& 
+	Label to initialization information (required for some complex types) \\
+&\textsf{rtti{\_}label : pasmlabel;}& 
+	Label to the runtime type information. \\
+&\textsf{nextglobal : pdef;}&  \\
+&\textsf{previousglobal : pdef;}&  \\
+&\textsf{savesize : longint;}& 
+	Size in bytes of the data definition \\
+&\textsf{deftype : tdeftype;}& 
+	Indicates the definition type (see \ref{tab5}). \\
+&\textsf{has{\_}inittable : boolean;}&  \\
+&\textsf{has{\_}rtti : boolean;}&  \\
+&\textsf{is{\_}def{\_}stab{\_}written : tdefstabstatus}& 
+	Can be one of the following states : (\textsf{not{\_}written,
+	written, being{\_}written}) which indicates if the debug information
+	for this type has been defined or not. \\
+&\textsf{globalnb : longint;}& 
+	Internal debug information type signature (each definition has a
+	numeric signature). \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{file definition (tfiledef)}
+\label{subsubsec:mylabel6}
+
+The file definition can occur in only some rare instances, when a 
+\textsf{file of }\textsf{\textit{type}} is parsed, a file definition of that 
+type will be created. Furthermore, internally, a definition for a 
+\textbf{Text} file type and \textbf{untyped} File type are created when the 
+system unit is loaded. These types are always defined when compiling any 
+unit or program.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{8.5cm}|}
+\hline
+\textsf{TYPE}& &   \\
+\xspace pFileDef = & \^{}  TFileDef; & \\
+\xspace \textsf{TFileDef} = & \textbf{Object}(TDef) & \\
+&\textsf{filetyp : tfiletyp;}& 
+	Indicates what type of file definition it is (\textsf{text},
+	\textsf{untyped} or \textsf{typed}). \\
+&\textsf{typedfiletype : ttype;}& 
+	In the case of a typed file definition, definition of the type of
+	the file \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{formal definition (tformaldef)}
+\label{subsubsec:formal}
+
+\subsubsection{forward definition (tforwarddef)}
+\label{subsubsec:forward}
+
+The forward definition is created, when a type is declared before an actual 
+definition exists. This is the case, when, for example \textsf{type 
+pmyobject = \ tmyobject}, while \textsf{tmyobject} has yet to be defined.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{6.5cm}|}
+\hline
+\textsf{TYPE} & &  \\
+\xspace pForwardDef = & \^{}  TForwardDef; & \\
+\xspace \textsf{TForwardDef} = & \textbf{Object}(TDef) & \\
+&\textsf{tosymname : string;}& 
+	The symbol name for this forward declaration (the actual real
+	definition does not exist yet) \\
+&\textsf{forwardpos : tfileposinfo;}& 
+	Indicates file position where this forward definition was declared.
+	\\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{error definition (terrordef)}
+\label{subsubsec:mylabel7}
+
+This definition is actually an empty definition entry. When the parser 
+encounters an error when parsing a definition instead of putting nothing in 
+the type for a symbol, it puts this entry. This avoids illegal memory 
+accesses later in parsing.
+
+\subsubsection{pointer definition (tpointerdef)}
+\label{subsubsec:pointer}
+
+The pointer definition is used for distinguishing between different types of 
+pointers in the compiler, and are created at each \textsf{\ typename} 
+parsing construct found.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE} & & \\
+\xspace pPointerDef = & \^{}  TPointerDef; & \\
+\xspace \textsf{TPointerDef} = & \textbf{Object}(TDef) & \\
+&\textsf{is{\_}far : boolean;}& 
+	Used to indicate if this is a far pointer or not (this flag is
+	cpu-specific) \\
+&\textsf{pointertype : ttype;}& 
+	This indicates to what type definition this pointer points to. \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{object definition (tobjectdef)}
+\label{subsubsec:object}
+
+The object definition is created each time an object declaration is found in 
+the type declaration section.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{6cm}|}
+\hline
+\textsf{TYPE}& & \\
+\xspace pObjectDef = & \^{}  TObjectDef; & \\
+\xspace \textsf{TObjectDef} = & \textbf{Object}(TDef) & \\
+&\textsf{childof : pobjectdef;}& 
+	This is a pointer to the parent object definition. It is set to nil,
+	if this object definition has no parent. \\
+&\textsf{objname : pstring;}& 
+	This is the object name \\
+&\textsf{symtable : psymtable;}& 
+	This is a pointer to the symbol table entries within this object. \\
+&\textsf{objectoptions : tobjectoptions;}& 
+	The options for this object, see the following table for the
+	possible options for the object. \\
+&\textsf{vmt{\_}offset : longint;}& 
+	This is the offset from the start of the object image in memory
+	where the virtual method table is located. \\
+&\textsf{writing{\_}class{\_}record{\_}stab : boolean;}&  \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Object Options(tobjectoptions) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{oo{\_}is{\_}class}& 
+	This is a delphi styled class declaration, and not a Turbo Pascal
+	object. \\
+\textsf{oo{\_}is{\_}forward}& 
+	This flag is set to indicate that the object has been declared in a
+	type section, but there is no implementation yet. \\
+\textsf{oo{\_}has{\_}virtual}& 
+	This object / class contains virtual methods \\
+\textsf{oo{\_}has{\_}private}& 
+	This object / class contains private fields or methods \\
+\textsf{oo{\_}has{\_}protected}& 
+	This object / class contains protected fields or methods \\
+\textsf{oo{\_}has{\_}constructor}& 
+	This object / class has a constructor method \\
+\textsf{oo{\_}has{\_}destructor}& 
+	This object / class has a destructor method \\
+\textsf{oo{\_}has{\_}vmt}& 
+	This object / class has a virtual method table \\
+\textsf{oo{\_}has{\_}msgstr}& 
+	This object / class contains one or more message handlers  \\
+\textsf{oo{\_}has{\_}msgint}& 
+	This object / class contains one or more message handlers  \\
+\textsf{oo{\_}has{\_}abstract}& 
+	This object / class contains one or more abstract methods \\
+\textsf{oo{\_}can{\_}have{\_}published}& 
+	the class has runtime type information, i.e. you can publish
+	properties \\
+\textsf{oo{\_}cpp{\_}class}& 
+	the object/class uses an C++ compatible class layout \\
+\textsf{oo{\_}interface}& 
+	this class is a delphi styled interface 
+\end{longtable}
+
+\subsubsection{class reference definition (tclassrefdef)}
+\label{subsubsec:class}
+
+\subsubsection{array definition (tarraydef)}
+\label{subsubsec:array}
+
+This definition is created when an array type declaration is parsed. It 
+contains all the information necessary for array type checking and code 
+generation.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{8.4cm}|}
+\hline
+\textsf{TYPE}& & \\
+\xspace pArrayDef = & \^{}  TArrayDef; & \\
+\xspace \textsf{TArrayDef} = & \textbf{Object}(TDef) & \\
+&\textsf{IsVariant : boolean;}&  \\
+&\textsf{IsConstructor : boolean;}&  \\
+&\textsf{rangenr: longint;}& 
+	Label number associated with the index values when range checking is
+	on \\
+&\textsf{lowrange : longint;}& 
+	The lower index range of the array definition \\
+&\textsf{highrange : longint;}& 
+	The higher index range of the array definition \\
+&\textsf{elementtype : ttype;}& 
+	The type information for the elements of the array \\
+&\textsf{rangetype : ttype;}& 
+	The type information for the index ranges of the array \\
+&\textsf{IsArrayofConst : boolean;}&  \\
+&\textsf{end;}& \\
+\hline
+\end{tabular*}
+
+\subsubsection{record definition (trecorddef)}
+\label{subsubsec:record}
+
+The record definition entry is created each time a record type declaration 
+is parsed. It contains the symbol table to the elements in the record.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{8.7cm}|}
+\hline
+\textsf{TYPE} & & \\
+\xspace pRecordDef = & \^{}  TRecordDef; & \\
+\xspace \textsf{TRecordDef} = & \textbf{Object}(TDef) & \\
+&\textsf{symtable : psymtable;}& 
+	This is a pointer to the symbol table entries within this record. \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{ordinal definition (torddef)}
+\label{subsubsec:ordinal}
+
+This type definition is the one used for all ordinal values such as char, 
+bytes and other numeric integer type values. Some of the predefined type 
+definitions are automatically created and loaded when the compiler starts. 
+Others are created at compile time, when declared.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE} & &  \\
+\xspace pOrdDef = & \^{}  TOrdDef; & \\
+\xspace \textsf{TOrdDef} = & \textbf{Object}(TDef) & \\
+&\textsf{low : longint;}& 
+	The minimum value of this ordinal type \\
+&\textsf{high : longint;}& 
+	The maximum value of this ordinal type \\
+&\textsf{typ : tbasetype;}& 
+	The type of ordinal value (cf. \ref{fig3}) \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Base ordinal type (tbasetype) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{uauto} & user defined ordinal type definition \\
+\textsf{uvoid} & Represents a void return value or node \\
+\textsf{uchar} & ASCII character (1 byte) \\
+\textsf{u8bit} & unsigned 8-bit value \\
+\textsf{u16bit}& unsigned 16-bit value \\
+\textsf{u32bit}& unsigned 32-bit value \\
+\textsf{s16bit}& signed 16-bit value \\
+\textsf{s32bit}& signed 32-bit value \\
+\textsf{bool8bit}& boolean 8-bit value \\
+\textsf{bool16bit}& boolean 16-bit value \\
+\textsf{bool32bit}& boolean 32-bit value \\
+\textsf{\textit{u64bit}}& 
+	\textit{unsigned 64-bit value (not fully supported/tested)} \\
+\textsf{s64bit}& signed 64-bit value \\\textsf{\textit{uwidechar}}& 
+	\textit{Currently not supported and unused} \\
+\end{longtable}
+
+\subsubsection{float definition (tfloatdef)}
+\label{subsubsec:float}
+
+This type definition is the one used for all floating point values such as 
+SINGLE, DOUBLE. Some of the predefined type definitions are automatically 
+created and loaded when the compiler starts. 
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE} & &  \\
+\xspace pFloatDef = & \^{}  TFloatDef; & \\
+\xspace \textsf{TFloatDef} = & \textbf{Object}(TDef) & \\
+&textsf{typ : tfloattype;}& 
+	The type of floating point value (cf. \ref{tab6}). \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Base floating point type (tfloattype) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{s32real}& IEEE Single precision floating point value \\
+\textsf{s64real}& IEEE Double precision floating point value \\
+\textsf{s80real}& 
+		Extended precision floating point value (cpu-specific,
+		usually maps to double) \\
+\textsf{s64comp}& 63-bit signed value, using 1 bit for sign indication \\
+\textsf{\textit{f16bit}}& \textit{Unsupported} \\
+\textsf{\textit{f32bit}}& \textit{Unsupported} \\
+\end{longtable}
+
+\subsubsection{abstract procedure definition (tabstractprocdef)}
+\label{subsubsec:abstract}
+
+This is the base of all routine type definitions. This object is abstract, 
+and is not directly used in a useful way. The derived object of this object 
+are used for the actual parsing process.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{5.5cm}|}
+\hline
+\textsf{TYPE}& & \\
+\xspace pAbstractProcDef = & \^{}  TAbstractProcDef; & \\
+\xspace \textsf{TAbstractProcDef} = & \textbf{Object}(TDef) & \\
+&\textsf{symtablelevel : byte;}&  \\
+&\textsf{fpu{\_}used : byte;}& 
+	Number of floating point registers used in this routine  \\
+&\textsf{rettype : ttype;}& 
+	Type information for the return value \par (uvoid if it returns nothing) \\
+&\textsf{proctypeoption : tproctypeoption;} & 
+	Indicates the type of routine it is (cf \ref{tab7}). \\
+&\textsf{proccalloptions : tproccalloptions;} & 
+	Indicates the calling convention of the routine (cf. \ref{tab8}). \\
+&\textsf{procoptions : tprocoptions;}& 
+	Indicates general procedure options.  \par (cf. \ref{tab9}). \\
+&\textsf{para : plinkedlist;}& 
+	This is a linked list of parameters (pparaitem list) \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Procedure options  \par (tproctypeoption)& Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{potype{\_}proginit}& 
+	Routine is the program entry point (defined as `\textsf{main}' in
+	the compiler). \\
+\textsf{potype{\_}unitinit}& 
+	Routine is the unit initialization code \par (defined as
+	unitname\textsf{{\_}init} in the compiler \\
+\textsf{potype{\_}unitfinalize}& 
+	Routine is the unit exit code \par (defined as
+	unitname\textsf{{\_}finalize} in the compiler) \\
+\textsf{potype{\_}constructor}& 
+	Routine is an object or class constructor \\
+\textsf{potype{\_}destructor}& 
+	Routine is an object or class destructor \\
+\textsf{potype{\_}operator}& 
+	Procedure is an operator \\
+\end{longtable}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+call options \par (tproccalloptions) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{pocall{\_}clearstack}& 
+	The routine caller clears the stack upon return \\
+\textsf{pocall{\_}leftright}& 
+	Send parameters to routine from left to right \\
+\textsf{pocall{\_}cdecl}& 
+	Passing parameters is done using the GCC alignment scheme, passing
+	parameter values is directly copied into the stack space \\
+\textsf{\textit{pocall{\_}register}}& 
+	\textit{unused (Send parameters via registers)} \\
+\textsf{pocall{\_}stdcall}& 
+	Passing parameters is done using GCC alignment scheme \\
+\textsf{\textit{pocall{\_}safecall}}& 
+	\textit{unused} \\
+\textsf{\textit{pocall{\_}palmossyscall}}& 
+	\textit{unused} \\
+\textsf{\textit{pocall{\_}system}}& 
+	\textit{unused} \\
+\textsf{pocall{\_}inline}& 
+	Routine is an inline assembler macro (not a true call) \\
+\textsf{pocall{\_}internproc}& 
+	System unit code generator helper routine \\
+\textsf{pocall{\_}internconst}& 
+	System unit code generator helper macro routine \\
+\end{longtable}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+routine options (tprocoptions) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{po{\_}classmethod}   & This is a class method \\
+\textsf{po{\_}virtualmethod }& This is a virtual method \\
+\textsf{po{\_}abstractmethod}& This is an abstract method \\
+\textsf{po{\_}staticmethod}  & This is a static method \\
+\textsf{po{\_}overridingmethod}& 
+	This is an overriden method (with po{\_}virtual flag usually) \\
+\textsf{po{\_}methodpointer}& 
+	This is a method pointer (not a normal routine pointer) \\
+\textsf{po{\_}containsself}& 
+	self is passed explicitly as a parameter to the method \\
+\textsf{po{\_}interrupt}& 
+	This routine is an interrupt handler \\
+\textsf{po{\_}iocheck}& 
+	IO checking should be done after a call to the procedure \\
+\textsf{po{\_}assembler}& 
+	The routine is in assembler \\
+\textsf{po{\_}msgstr}& 
+	method for string message handling \\
+\textsf{po{\_}msgint}& 
+	method for int message handling \\
+\textsf{po{\_}exports}& 
+	Routine has export directive  \\
+\textsf{po{\_}external}& 
+	Routine is external (in other object or lib) \\
+\textsf{po{\_}savestdregs}& 
+	Routine entry should save all registers used by GCC \\
+\textsf{po{\_}saveregisters}& 
+	Routine entry should save all registers \\
+\textsf{po{\_}overload}& 
+	Routine is declared as being overloaded \\
+\end{longtable}
+
+\subsubsection{procedural variable definition (tprocvardef)}
+\label{subsubsec:procedural}
+
+This definition is created when a procedure variable type is declared. It 
+gives information on the type of a procedure, and is used when assigning and 
+directly calling a routine through a pointer.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{7.8cm}|}
+\hline
+\textsf{TYPE} & &  \\
+\xspace pProcVarDef = & \^{}  TProcVarDef; & \\
+\xspace \textsf{TProcVarDef} = & \textbf{Object}(TAbstractProcDef) & \\
+& \textsf{end;}&\\ 
+\hline
+\end{tabular*}
+
+\subsubsection{procedure definition (tprocdef)}
+\label{subsubsec:mylabel8}
+
+When a procedure head is parsed, the definition of the routine is created. 
+Thereafter, other fields containing information on the definition of the 
+routine are populated as required.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{7.8cm}|}
+\hline
+\textsf{TYPE} & &  \\
+\xspace pProcDef = & \^{}  TProcDef; & \\
+\xspace \textsf{TProcDef} = & \textbf{Object}(TAbstractProcDef) & \\
+&\textsf{forwarddef : boolean;}& TRUE if this is a forward definition \\
+&\textsf{interfacedef: boolean;}&  \\
+&\textsf{extnumber : longint;}&  \\
+&\textsf{messageinf : tmessageinf;}&  \\
+&\textsf{nextoverloaded : pprocdef;}&  \\
+&\textsf{fileinfo : tfileposinfo;}& 
+	Position in source code for the declaration of this routine. Used
+	for error management. \\
+&\textsf{localst : psymtable;}& The local variables symbol table \\
+&\textsf{parast: psymtable;}& The parameter symbol table \\
+&\textsf{procsym : pprocsym;}& Points to owner of this definition \\
+&\textsf{lastref : pref;}&  \\
+&\textsf{defref: pref;}&  \\
+&\textsf{crossref : pref;}&  \\
+&\textsf{lastwritten : pref;}&  \\
+&\textsf{refcount : longint;}&  \\
+&\textsf{{\_}class : probjectdef;}&  \\
+&\textsf{code : pointer;}& 
+	The actual code for the routine (only for inlined routines) \\
+&\textsf{usedregisters : tregisterset;}& 
+	The set of registers used in this routine \\
+&\textsf{hasforward : boolean;}&  \\
+&\textsf{count: boolean;}&  \\
+&\textsf{is{\_}used : boolean;}&  \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{string definition (tstringdef)}
+\label{subsubsec:string}
+
+This definition represents all string types as well as derived types. Some 
+of the default string type definitions are loaded when the compiler starts 
+up. Others are created at compile time as they are declared with a specific 
+length type.
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{9cm}|}
+\hline
+\textsf{TYPE}& & \\
+\xspace pStringDef = & \^{}  TStringDef; & \\
+\xspace \textsf{TStringDef} = & \textbf{Object}(TDef) & \\
+&\textsf{string{\_}typ : tstringtype;}& 
+	Indicates the string type definition (cf. \ref{tab10}) \\
+&\textsf{len : longint;}& 
+	This is the maximum length which can have the string \\
+&\textsf{end;}& \\
+\hline
+\end{tabular*}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+String type \par (tstringtype) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{st{\_}default}& 
+	Depends on current compiler switches, can either be a
+	st{\_}shortstring or st{\_}ansistring \\
+\textsf{st{\_}shortstring}& 
+	short string (length byte followed by actual ASCII characters (1
+	byte/char)) \\
+\textsf{st{\_}longstring}& 
+	long string (length longint followed by actual ASCII characters (1
+	byte/char)) \\
+\textsf{st{\_}ansistring}& 
+	long string garbage collected (pointer to a length, reference count
+	followed by actual ASCII characters (1 byte/char)) \\
+\textsf{\textit{st{\_}widestring}}& 
+	\textit{long string garbage collected (pointer to a length,
+	reference count followed by actual unicode characters (1
+	word/char))} \\
+\end{longtable}
+
+\subsubsection{enumeration definition (tenumdef)}
+\label{subsubsec:mylabel9}
+
+An enumeration definition is created each time an enumeration is declared 
+and parsed. Each element in the enumeration will be added to the linked list 
+of symbols associated with this enumeration, and this symbol table will then 
+be attached to the enumeration definition.
+
+\begin{tabular*}{6,5in}{|l@{\extracolsep{\fill}}lp{6,5cm}|}
+\hline
+\textsf{TYPE} & & \\
+\xspace \textsf{pEnumDef} &= \^{} \textbf{TEnumDef};&  \\
+\xspace \textsf{TEnumDef} &= \textbf{object}(TDef) & \\
+&\textsf{\textit{has{\_}jumps : boolean;}}& 
+    \textit{Currently unused} \\
+&\textsf{minval : longint;}& 
+    Value of the first element in the enumeration \\
+&\textsf{maxval : longint;}& 
+    Value of the last element in the enumeration \\
+&\textsf{firstenum : penumsym;}& 
+    Pointer to a linked list of elements in the enumeration, each with
+    its name and value. \\
+&\textsf{basedef : penumdef;}& 
+    In the case where the enumeration is a subrange of another enumeration,
+    this gives information on the base range of the elements \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{set definition (tsetdef)}
+\label{subsubsec:mylabel10}
+
+This definition is created when a set type construct is parsed (\textsf{set 
+of declaration}). 
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{6,5cm}|}
+\hline
+\textsf{TYPE} & & \\
+\xspace \textsf{pSetDef} &= \^{} \textbf{TSetDef};&  \\
+\xspace \textsf{TSetDef} &= \textbf{object}(TDef) & \\
+&\textsf{settype : tsettype;}& 
+    Indicates the storage type of the set (Cf. \ref{tab11}). \\
+&\textsf{elementtype : ttype;}& 
+    Points the type definition and symbol table to the elements in the set. \\
+&\textsf{end;}&  \\
+\hline
+\end{tabular*}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+set type (tsettype) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{normset}& 
+    Normal set of up to 256 elements (32 byte storage space required) \\
+\textsf{smallset}& 
+    Small set of up to 32 elements (4 byte storage space) \\
+\textsf{\textit{varset}}& 
+    \textit{Variable number of element set (storage size is dependent on number
+    of elements) (currently unused and unsupported)} \\
+\end{longtable}
+
+\subsection{Definition interface}
+\label{subsec:definition}
+
+\begin{function}{TDef.Size}
+\Declaration
+Function TDef.size : longint;
+\Description
+This method returns the true size of the memory space required in bytes for
+this type definition (after alignment considerations). 
+\end{function}
+
+\begin{function}{TDef.Alignment}
+\Declaration
+Function TDef.Alignment : longint; 
+\Description
+This method returns the alignment of the data for complex types such as
+records and objects, otherwise returns 0 or 1 (no alignment). 
+\end{function}
+
+\section{The parser}
+\label{sec:mylabel5}
+
+The task of the parser is to read the token fed by the scanner, and make 
+sure that the pascal syntax is respected. It also populates the symbol 
+table, and creates the intermediate nodes (the tree) which will be used by 
+the code generator.
+
+An overview of the parsing process, as well as its relationship with the 
+tree the type checker and the code generator is shown in the following 
+diagram:
+
+\subsection{Module information}
+\label{subsec:module}
+
+Each module being compiled, be it a library , unit or main program has some 
+information which is required. This is stored in the tmodule object in 
+memory. To avoid recompilation of already compiled module, the dependencies 
+of the modules is stored in a PPU file, which makes it easier to determine 
+which modules to recompile.
+
+\begin{longtable}{|l@{\extracolsep{\fill}}lp{7cm}|}
+\hline
+\endhead
+\hline
+\endfoot
+%\begin{tabular*}
+\textsf{TYPE}& & \\
+\xspace pModule = & \^{}  TModule; & \\
+\xspace \textsf{TModule} = & \textbf{Object}(TLinkedList\_Item) & \\
+&\textsf{ppufile : pppufile;}& Pointer to PPU file object (unit file) \\
+&\textsf{crc : longint;}& CRC-32 bit of the whole PPU file \\
+&\textsf{interface{\_}crc : longint;}& CRC-32 bit of the interface part of the PPU file \\
+&\textsf{flags: longint;}& Unit file flags \\
+&\textsf{compiled: boolean;}& TRUE if module is already compiled \\
+&\textsf{do{\_}reload : boolean;}	& TRUE if the PPU file must be reloaded \\
+&\textsf{do{\_}assemble : boolean;}	& Only assemble, don't recompile unit \\
+&\textsf{sources{\_}avail : boolean;}	& TRUE if all sources of module are available \\
+&\textsf{sources{\_}checked : boolean;}	& TRUE if the sources has already been checked \\
+&\textsf{is{\_}unit: boolean;}		& TRUE if this is a unit (otherwise a library or a main program) \\
+&\textsf{in{\_}compile: boolean;}	& module is currently being recompiled \\
+&\textsf{in{\_}second{\_}compile: boolean;}& module is being compiled for second time \\
+&\textsf{in{\_}second{\_}load: boolean;}	& module is being reloaded a second time \\
+&\textsf{in{\_}implementation : boolean;}& currently compiling implementation part (units only) \\
+&\textsf{in{\_}global : boolean;}	& currently compiling implementation part (units only) \\
+&\textsf{recompile{\_}reason : trecompile{\_}reason;}& Reason why module should be recompiled \\
+&\textsf{islibrary : boolean;}& 		TRUE if this module is a shared library \\
+&\textsf{map : punitmap;}		& Map of all used units for this unit \\
+&\textsf{unitcount : word;}		& Internal identifier of unit (for GDB support) \\
+&\textsf{unit{\_}index : word;}		&  \\
+&\textsf{globalsymtable : pointer;}	& Symbol table for this module of externally visible symbols \\
+&\textsf{localsymtable : pointer;}	& Symbol table for this module of locally visible symbols \\
+&\textsf{scanner : pointer;}		& Scanner object pointer \\
+&\textsf{loaded{\_}from : pmodule;}	& Module which referred to this module \\
+&\textsf{uses{\_}imports : boolean;}	& TRUE if this module imports symbols from a shared library \\
+&\textsf{imports : plinkedlist}		& Linked list of imported symbols \\
+&\textsf{{\_}exports : plinkedlist;}	& Linked list of exported symbols (libraries only) \\
+&\textsf{sourcefiles : pfilemanager;}	& List of all source files for this module \\
+&\textsf{resourcefiles : tstringcontainer;} & List of all resource files for this module \\
+&\textsf{used{\_}units : tlinkedlist; }	& Information on units used by this module (pused{\_}unit) \\
+&\textsf{dependent{\_}units : tlinkedlist;}&  \\
+&\textsf{localunitsearchpath : TsearchPathList;}& Search path for obtaining module source code \\
+&\textsf{localobjectsearchpath:TsearchPathList;}&  \\
+&\textsf{localincludesearchpath:TsearchPathList;}& Search path for includes for this module \\
+&\textsf{locallibrarysearchpathTSearchPathList;}&  \\
+&\textsf{path : pstring;}& Path were module is located or created \\
+&\textsf{outputpath : pstring;}& Path where object files (unit), executable (program) or shared library (library) is created \\
+&\textsf{modulename : pstring;}& Name of the module in uppercase \\
+&\textsf{objfilename : pstring;}& Full name of object file or executable file \\
+&\textsf{asmfilename : pstring;}& Full name of the assembler file \\
+&\textsf{ppufilename : pstring;}& Full name of the PPU file \\
+&\textsf{staticlibfilename : pstring;}& Full name of the static library name (used when smart linking is used) \\
+&\textsf{sharedlibfilename : pstring;}& Filename of the output shared library (in the case of a library) \\
+&\textsf{exefilename : pstring;}& Filename of the output executable (in the case of a program) \\
+&\textsf{asmprefix : pstring;}& Filename prefix of output assembler files when using smartlinking \\
+&\textsf{mainsource : pstring;}& Name of the main source file \\
+&\textsf{end;}& \\
+%\end{tabular*}
+\end{longtable}
+
+\subsection{Parse types}
+\label{subsec:parse}
+
+\subsubsection{Entry}
+\label{subsubsec:entry}
+
+\begin{figure}
+\ifpdf
+\includegraphics{arch8.pdf}
+%\epsfig{file=arch8.png,width=\textwidth}
+\else
+\includegraphics[width=4.99in,height=8.36in]{arch8.eps}
+\fi
+\label{fig8}
+\caption{Parser - Scanner flow}
+\end{figure}
+
+\subsubsection{program or library parsing }
+
+\subsubsection{unit parsing }
+\label{subsubsec:mylabel12}
+
+\subsubsection{routine parsing }
+\label{subsubsec:routine}
+
+\subsubsection{label declarations }
+\label{subsubsec:mylabel13}
+
+\subsubsection{constant declarations}
+\label{subsubsec:mylabel14}
+
+\subsubsection{type declarations}
+\label{subsubsec:mylabel15}
+
+\subsubsection{variable declarations}
+\label{subsubsec:mylabel16}
+
+\subsubsection{thread variable declarations}
+\label{subsubsec:thread}
+
+\subsubsection{resource string declarations}
+\label{subsubsec:resource}
+
+\subsubsection{exports declaration}
+\label{subsubsec:exports}
+
+\subsubsection{expression parsing }
+\label{subsubsec:expression}
+
+\subsubsection{typed constant declarations}
+\label{subsubsec:mylabel17}
+
+\subsection{Parser interface}
+\label{subsec:parser}
+
+\subsubsection{Routines}
+\label{subsubsec:routinesnterfaceecla}
+
+\subsubsection{Variables}
+\label{subsubsec:variablesterfaceecla}
+
+\paragraph{General}
+
+\begin{variable}{AktProcSym}
+\Declaration
+Var aktprocsym : pProcSym;
+\Description
+Pointer to the symbol information for the routine currently being parsed. 
+\end{variable}
+
+\begin{variable}{LexLevel}
+\Declaration
+var lexlevel : longint;
+\Description
+Level of code currently being parsed and compiled  \par 0 = for main program
+\par 1 = for subroutine \par 2 = for local / nested subroutines.
+\end{variable}
+
+\begin{variablel}{Current{\_}Module}{currentmodule}
+\Declaration
+var Current{\_}Module : pModule;
+\Description
+Information on the current module (program, library or unit) being compiled.
+\end{variablel}
+
+\paragraph{Ordinal definitions}
+
+The following variables are default type definitions which are created each 
+time compilation begins (default system-unit definitions), these definitions 
+should always be valid:
+
+\begin{variable}{VoidDef}
+\Declaration
+var VoidDef : pOrdDef;
+\Description 
+Pointer to procedure??? 
+\Notes
+This is loaded as a default supported type for the compiler 
+\end{variable}
+
+\begin{variable}{cCharDef}
+\Declaration
+var cCharDef : pOrdDef;
+\Description
+Type definition for a character (\textsf{char}) 
+\Notes
+This is loaded as a default supported type for the compiler 
+\end{variable}
+
+\begin{variable}{cWideCharDef}
+\Declaration
+var cWideCharDef : pOrdDef;
+\Description
+Type definition for a unicode character (\textsf{widechar}) 
+\Notes 
+This is loaded as a default supported type for the compiler 
+\end{variable}
+
+\begin{variable}{BoolDef}
+\Declaration
+var BoolDef : pOrdDef;
+\Description
+Type definition for a boolean value (\textsf{boolean})
+\Notes
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{u8BitDef}
+\Declaration
+var u8BitDef : pOrdDef;
+\Description
+Type definition for an 8-nit unsigned value (\textsf{byte})
+\Notes
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{u16BitDef}
+\Declaration
+var u16BitDef : pOrdDef;
+\Description
+Type definition for an unsigned 16-bit value (\textsf{word})
+\Notes
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{u32BitDef}
+\Declaration
+var u32BitDef : pOrdDef;
+\Description
+Type definition for an unsigned 32-bit value (\textsf{cardinal})
+\Notes
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{s32BitDef}
+\Declaration
+var s32BitDef : pOrdDef;
+\Description
+Type definition for a signed 32-bit value (\textsf{longint})
+\Notes
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{cu64BitDef}
+\Declaration
+var cu64BitDef : pOrdDef;
+\Description
+Type definition for an unsigned 64-bit value (\textsf{qword})
+\Notes
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{cs64BitDef}
+\Declaration
+var cs64BitDef : pOrdDef;
+\Description
+Type definition for a signed 64-bit value (\textsf{int64})
+\Notes
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\paragraph{floating point definitions}
+
+The following variables are default type definitions which are created each
+time compilation begins (default system-unit definitions), these definitions
+should always be valid:
+
+\begin{variable}{s64FloatDef} 
+\Declaration
+var s64FloatDef : pFloatDef; 
+\Description 
+Type definition for a 64-bit IEEE floating point type (\textsf{double})
+\Notes 
+This is loaded as a default supported type for the compiler. This might not
+actually really point to the double type if the cpu does not support it.
+\end{variable}
+
+\begin{variable}{s32FloatDef} 
+\Declaration
+var s32FloatDef : pFloatDef; 
+\Description 
+Type definition for a 32-bit IEEE floating point type (\textsf{single})
+\Notes
+This is loaded as a default supported type for the compiler. This might not
+actually really point to the single type if the cpu does not support it.
+\end{variable}
+
+\begin{variable}{s80FloatDef}
+\Declaration 
+var s80FloatDef : pFloatDef; 
+\Description 
+Type definition for an extended floating point type (\textsf{extended})
+\Notes 
+This is loaded as a default supported type for the compiler. This
+might not actually really point to the extended type if the cpu does not
+support it.
+\end{variable}
+
+\begin{variable}{s32FixedDef}
+\Declaration 
+var s32FixedDef : pFloatDef; 
+\Description 
+Type definition for a fixed point 32-bit value (\textsf{fixed})
+\Notes 
+This is loaded as a default supported type for the compiler. This is
+not supported officially in FPC 1.0
+\end{variable}
+
+\clearpage 
+
+\paragraph{String definitions}
+The following variables are default type definitions which are created each
+time compilation begins (default system-unit definitions), these definitions
+should always be valid:
+
+\begin{variable}{cShortStringDef}
+\Declaration 
+var cShortStringDef : pStringDef; 
+\Description 
+Type definition for a short string type (\textsf{shortstring})
+\Notes 
+This is loaded as a default supported type for the compiler.
+\end{variable}
+
+\begin{variable}{cLongStringDef}
+\Declaration
+var cLongStringDef : pStringDef;
+\Description
+Type definition for a long string type (\textsf{\textit{longstring}}) 
+\Notes
+This is loaded as a default supported type for the compiler.
+\end{variable}
+
+\begin{variable}{cAnsiStringDef}
+\Declaration 
+var cAnsiStringDef : pStringDef; 
+\Description 
+Type definition for an ansistring type (\textsf{ansistring})
+\Notes 
+This is loaded as a default supported type for the compiler.
+\end{variable}
+
+\begin{variable}{cWideStringDef}
+\Declaration
+var cWideStringDef : pStringDef;
+\Description
+Type definition for an wide string type (\textsf{\textit{widestring}}) 
+\Notes
+This is loaded as a default supported type for the compiler.
+\end{variable}
+
+\begin{variable}{OpenShortStringDef}
+\Declaration 
+var OpenShortStringDef : pStringDef; 
+\Description 
+Type definition for an open string type (\textsf{openstring})
+\Notes 
+This is loaded as a default supported type for the compiler.
+\end{variable}
+
+\begin{variable}{OpenCharArrayDef}
+\Declaration 
+var OpenCharArrayDef : pArrayDef; 
+\Description 
+Type definition for an open char array type(\textsf{openchararray}) 
+\Notes
+This is loaded as a default supported type for the compiler.
+\end{variable}
+
+\clearpage 
+
+\paragraph{Pointer definitions}
+
+The following variables are default type definitions which are created each
+time compilation begins (default system-unit definitions), these definitions
+should always be valid:
+
+\begin{variable}{VoidPointerDef}
+\Declaration 
+var VoidPointerDef : pPointerDef; 
+\Description 
+Type definition for a pointer which can point to anything (\textsf{pointer})
+\Notes 
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{CharPointerDef}
+\Declaration 
+var CharPointerDef : pPointerDef; 
+\Description 
+Type definition for a pointer which can point to characters (\textsf{pchar})
+\Notes 
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{VoidFarPointerDef}
+\Declaration 
+var VoidFarPointerDef : pPointerDef; 
+\Description 
+Type definition for a pointer which can point to anything 
+(intra-segment) (\textsf{far pointer}) 
+\Notes 
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\begin{variable}{cFormalDef}
+\Declaration 
+var cFormalDef : pFormalDef; 
+\Notes 
+This is loaded as a default supported type for the compiler
+\end{variable}
+
+\paragraph{Other definitions}
+
+\begin{variable}{cfFileDef}
+\Declaration 
+var cfFileDef : pFileDef; 
+\Description This is the default file type (\textsf{file}) 
+\Notes This is loaded as a default supported type for the compiler
+\end{variable}
+
+\section{The inline assembler parser}
+\label{sec:mylabel6}
+
+\section{The code generator}
+\label{sec:mylabel7}
+
+\subsection{Introduction}
+\label{subsec:introductioneratorer}
+
+The code generator is responsible for creating the assembler output in form 
+of a linked list, taking as input the node created in the parser and the 
+1$^{st}$ pass. The following diagram shows an overview of the code generator 
+architecture:
+
+\begin{figure}
+\ifpdf
+\includegraphics{arch9.pdf}
+%\epsfig{file=arch9.png,width=\textwidth}
+\else
+\includegraphics[width=5.68in,height=1.76in]{arch9.eps}
+\fi
+\label{fig9}
+\caption{Codegenerator architecture}
+\end{figure}
+
+The code generation is only done when a procedure body is parsed; the 
+interaction, between the 1$^{st}$ pass (type checking phase), the code 
+generation and the parsing process is show in the following diagram:
+
+\begin{figure}
+\ifpdf
+\includegraphics{arch10.pdf}
+%\epsfig{file=arch10.png,width=\textwidth}
+\else
+\includegraphics[width=6.95in,height=4.90in]{arch10.eps}
+\fi
+\label{fig10}
+\caption{Interaction between codegeneration and the parsing process}
+\end{figure}
+
+The \textsf{secondpass()} is actually a simple dispatcher. Each possible 
+tree type node (Cf. Tree types) is associated with 
+a second pass routine which is called using a dispatch table. 
+
+\subsection{Locations (cpubase.pas)}
+\label{subsec:locations}
+
+The code generator uses the tree location component to indicate the location 
+where the current node operands are located. This is then used by the code 
+generator to generate the appropriate instruction, all depending on the 
+location of the operand. The possible operand locations:
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Location define & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{LOC{\_}INVALID}& 
+    Invalid location (should never occur) \\
+\textsf{LOC{\_}FPU}& 
+    Floating point registers \\
+\textsf{LOC{\_}REGISTER}& 
+    Integer registers \\
+\textsf{LOC{\_}MEM}& 
+    Memory Location \\
+\textsf{LOC{\_}REFERENCE}& 
+    Constant node with constant value \\
+\textsf{LOC{\_}JUMP}& 
+    Label operand \\
+\textsf{LOC{\_}FLAGS}& 
+    Flags operand \\
+\textsf{LOC{\_}CREGISTER}& 
+    Constant integer register (when operand is in this
+    location, it should be considered as read-only) \\
+\end{longtable}
+
+Depending on the location type, a variable structure is defined indicating 
+more information on the operand. This is used by the code generator to 
+generate the exact instructions.
+
+\subsubsection{LOC{\_}INVALID}
+\label{subsubsec:mylabel18}
+
+This location does not contain any related information, when this location 
+occurs, it indicates that the operand location was not initially allocated 
+correctly. This indicates a problem in the compiler.
+
+\subsubsection{LOC{\_}FPU}
+\label{subsubsec:mylabel19}
+
+This indicates a location in the coprocessor; this is platform dependant.
+
+\paragraph{Stack based FPU}
+
+Only one CPU uses a stack based FPU architecture, this is the intel 80x86 
+family of processors. When the operand is on the top of the stack, the 
+operand is of type LOC{\_}FPU.
+
+\paragraph{Register based FPU}
+
+When the floating point co-processor is register based, the following 
+field(s) are defined in the structure to indicate the current location of 
+the operand:
+
+\begin{longtable}{|l|p{7cm}|}
+\hline
+Field   & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{fpuregister : tregister;}& 
+    Indicates in what register the operand is located (a general purpose
+    register in emulation mode, and a floating point register when floating
+    point hardware is present) \\
+\textsf{fpuregisterhigh, } \par \textsf{fpuregisterlow : tregister;}& 
+    Indicates in what registers the operand are located (for emulation
+    support - these are general purpose registers)
+\end{longtable}
+
+\subsubsection{LOC{\_}REGISTER}
+\label{subsubsec:mylabel20}
+
+This fields indicates that the operand is located in a CPU register. It is 
+possible to allocate more then one register, if trying to access 64-bit 
+values on 32-bit wide register machines.
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Field   & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{register : tregister}& 
+    Indicates in what register the operand is located. \\
+\textsf{registerhigh : tregister;}& 
+    High 32-bit of 64-bit virtual register (on 32-bit machines) \\
+\textsf{registerlow : tregister;}& 
+    Low 32-bit of 64-bit virtual register (on 32-bit machines)
+\end{longtable}
+
+\subsubsection{LOC{\_}MEM, LOC{\_}REFERENCE}
+\label{subsubsec:mylabel21}
+
+This either indicates an operand in memory, or a constant integer numeric 
+value. The fields for this type of operand is as follows:
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Field   & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{reference : treference;}& 
+    Information on the location in memory
+\end{longtable}
+
+References are the basic building blocks of the code generator, every load 
+and store in memory is done via a reference. A reference type can either 
+point to a symbolic name, an assembler expression (base register + index 
+register + offset)*scale factor, as well as simply giving information on a 
+numeric value.
+
+The treference consists of the following:
+
+\begin{tabular*}{6.5in}{|l@{\extracolsep{\fill}}lp{6,5cm}|}
+\hline
+\textsf{TYPE} & & \\
+\xspace \textsf{pReference} &= \^{} \textbf{TReference};&  \\
+\xspace \textsf{TReference} &= \textbf{packed Record} & \\
+&\textsf{is{\_}immediate : boolean;}& 
+    Indicates that this location points to a memory location, but to a
+    constant value (TRUE), which is located in the offset field. \\
+&\textsf{segment : tregister;}& (cpu-specific) \\
+&\textsf{base : tregister;}& 
+    Base address register for assembler expression \\
+&\textsf{index : tregister;}& 
+    Index register for assembler expression \\
+&\textsf{scalefactor : byte;}& 
+    Multiplication factor for assembler expression (this field is
+    cpu-specific) \\
+&\textsf{offset : longint;}& 
+    Either an offset from base assembler address expression to add (if
+    is{\_}constant = FALSE) otherwise the numeric value of the operand \\
+&\textsf{symbol : pasmsymbol;}& 
+    Pointer to the symbol name string of the reference in case where it is
+    a symbolic reference \\
+&\textsf{offsetfixup : longint;}&  \\
+&\textsf{options : trefoptions;}&  \\
+&\textsf{END;}&  \\
+\hline
+\end{tabular*}
+
+\subsubsection{LOC{\_}JUMP}
+\label{subsubsec:mylabel22}
+
+There are no fields associated with this location, it simply indicates that 
+it is a boolean comparison which must be done to verify the succeeding 
+operations. (i.e the processor zero flag is valid and gives information on 
+the result of the last operation).
+
+\subsubsection{LOC{\_}FLAGS}
+\label{subsubsec:mylabel23}
+
+The operand is in the flags register. From this operand, the conditional 
+jumps can be done. This is processor dependant, but normally the flags for 
+all different comparisons should be present.
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Field   & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{resflags : tresflags;}& 
+    This indicates the flag which must be verified for the actual jump
+    operation. \textsf{tresflags }is an enumeration of all possible
+    conditional flags which can be set by the processor. \\
+\end{longtable}
+
+\subsubsection{LOC{\_}CREGISTER}
+\label{subsubsec:mylabel24}
+
+This is a read-only register allocated somewhere else in the code generator. 
+It is used mainly for optimization purposes. It has the same fields as 
+LOC{\_}REGISTER, except that the registers associated with this location can 
+only be read from, and should never be modified directly.
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Field   & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{register : tregister}& 
+    Indicates in what register the operand is located. \\
+\textsf{registerhigh : tregister;}& 
+    High 32-bit of 64-bit virtual register (on 32-bit machines) \\
+\textsf{registerlow : tregister;}& 
+    Low 32-bit of 64-bit virtual register (on 32-bit machines) \\
+\end{longtable}
+
+\subsubsection{LOCATION PUBLIC INTERFACE}
+\label{subsubsec:location}
+
+\begin{procedurel}{Del{\_}Location}{dellocation}
+\Declaration
+procedur Del{\_}Location(const L : TLocation);
+\Description
+If the location points to a LOC{\_}REGISTER or LOC{\_}CREGISTER, it frees up
+the allocated register(s) associated with this location. If the location
+points to LOC{\_}REFERENCE or LOC{\_}MEM, it frees up the the allocated base
+and index registers associated with this node. 
+\end{procedurel}
+
+\begin{procedurel}{Clear{\_}Location}{clearlocation}
+\Declaration
+procedure Clear{\_}location(var Loc : TLocation);
+\Description
+Sets the location to point to a LOC{\_}INVALID type. 
+\end{procedurel}
+
+\begin{procedurel}{Set{\_}Location}{setlocation}
+\Declaration
+procedure Set{\_}Location(var Destloc,Sourceloc : TLocation);
+\Description
+The destination location now points to the destination location (now copy is
+made, a simple pointer assignment) 
+\end{procedurel}
+
+\begin{procedurel}{Swap{\_}Location}{swaplocation}
+\Declaration
+Procedure Swap{\_}Location(var Destloc,Sourceloc : TLocation);
+\Description
+Swap both location pointers. 
+\end{procedurel}
+
+\subsection{Registers (cpubase.pas)}
+\label{subsec:registers}
+
+The code generator defines several types of registers which are categorized 
+by classes. All (except for the scratch register class) of these register 
+classes are allocated / freed on the fly, when the code is generated in the 
+code generator: The registers are defined in a special enumeration called 
+tregister. This enumeration contains all possible register defines for the 
+target architecture, and a possible definition could be as follows :
+
+% FIXME this should be changed to something more TeXish
+
+\textsf{tregister = (}
+
+\textsf{{\{} general purpose registers {\}} }
+
+\textsf{R{\_}NO,R{\_}D0,R{\_}D1,R{\_}D2,R{\_}D3,R{\_}D4,R{\_}D5,R{\_}D6,R{\_}D7,}
+
+\textsf{{\{} address registers {\}}}
+
+\textsf{R{\_}A0,R{\_}A1,R{\_}A2,R{\_}A3,R{\_}A4,R{\_}A5,R{\_}A6,R{\_}SP,}
+
+\textsf{{\{} PUSH/PULL- quick and dirty hack {\}}}
+
+\textsf{R{\_}SPPUSH,R{\_}SPPULL,}
+
+\textsf{{\{} misc. and floating point registers {\}}}
+
+\textsf{R{\_}CCR,R{\_}FP0,R{\_}FP1,R{\_}FP2,R{\_}FP3,R{\_}FP4,R{\_}FP5,R{\_}FP6,}
+
+\textsf{R{\_}FP7,R{\_}FPCR,R{\_}SR,R{\_}SSP,R{\_}DFC,R{\_}SFC,R{\_}VBR,R{\_}FPSR,}
+
+\textsf{{\{} other - not used {\}}}
+
+\textsf{R{\_}DEFAULT{\_}SEG}
+
+\textsf{);}
+
+\subsubsection{integer registers}
+\label{subsubsec:integer}
+
+\textsf{intregs: array[1..maxintregs] of tregister;}
+
+General purpose registers which can contain any data, usually integer 
+values. These can also be used, when no floating point coprocessor is 
+present, to hold values for floating point operations. 
+
+\subsubsection{address registers}
+\label{subsubsec:address}
+
+\textsf{addrregs: array[1..maxaddrregs] of tregister;}
+
+Registers which are used to construct assembler address expressions, usually 
+the address registers are used as the base registers in these assembler 
+expressions.
+
+\subsubsection{fpu registers}
+\label{subsubsec:mylabel25}
+
+\textsf{fpuregs: array[1..maxfpuregs] of tregister;}
+
+Hardware floating point registers. These registers must at least be able to 
+load and store IEEE DOUBLE floating point values, otherwise they cannot be 
+considered as FPU registers. Not available on systems with no floating point 
+coprocessor.
+
+\subsubsection{scratch registers}
+\label{subsubsec:scratch}
+
+\textsf{scratch{\_}regs: array[1..maxscratchregs] of tregister;}
+
+These registers are used as scratch, and can be used in assembler statement 
+in the pascal code, without being saved. They will always be valid across 
+routine calls. These registers are sometimes temporarily allocated inside 
+code generator nodes, and then immediately freed (always inside the same 
+routine).
+
+\subsection{Special registers (cpubase.pas)}
+\label{subsec:special}
+
+The code generator has special uses for certain types of registers. These 
+special registers are of course CPU dependant, but as an indication, the 
+following sections explains the uses of these special registers and their 
+defines.
+
+\subsubsection{stack{\_}pointer}
+\label{subsubsec:stack}
+
+\textsf{const stack{\_}pointer = R{\_}A7}
+
+This represents the stack pointer, an address register pointing to the 
+allocated stack area.
+
+\subsubsection{frame{\_}pointer}
+\label{subsubsec:frame}
+
+\textsf{const frame{\_}pointer = R{\_}A6}
+
+This represents the frame register which is used to access values in the 
+stack. This is usually also an address register.
+
+\subsubsection{self{\_}pointer}
+\label{subsubsec:mylabel26}
+
+\textsf{const self{\_}pointer = R{\_}A5}
+
+This represents the self register, which represents a pointer to the current 
+instance of a class or object.
+
+\subsubsection{accumulator}
+\label{subsubsec:accumulatorents}
+
+\textsf{const accumulator = R{\_}D0}
+
+The accumulator is used (except in the i386) as a scratch register, and also 
+for return value in functions (in the case where they are 32-bit or less). 
+In the case it is a 64-bit value (and the target processor only supports 
+32-bit registers) , the result of the routine is stored in the accumulator 
+for the low 32-bit value, and in the scratch register 
+(\textsf{scratch{\_}register}) for the high 32-bit value.
+
+\subsubsection{scratch register}
+\label{subsubsec:mylabel27}
+
+\textsf{const scratch{\_}reg = R{\_}D1}
+
+This register is used in special circumstances by the code generator. It is 
+simply a define to one of the registers in the \textsf{scratch{\_}regs 
+}array.
+
+\subsection{Instructions}
+\label{subsec:instructionsr}
+
+\subsection{Reference subsystem}
+\label{subsec:reference}
+
+\subsubsection{Architecture}
+\label{subsubsec:architecturebsysteme}
+
+As described before in the locations section, one of the possible locations 
+for an operand is a memory location, which is described in a special 
+structure \textsf{treference} (described earlier). This subsection describes 
+the interface available by the code generator for allocation and freeing 
+reference locations.
+
+\subsubsection{Code generator interface}
+\label{subsubsec:mylabel28}
+
+\lstinline!Function NewReference(Const R : TReference) : pReference;!
+
+\begin{procedure}{DisposeReference}
+\Declaration
+Procedure DisposeReference(Var R : pReference);
+\Description 
+Disposes of the reference \textsf{R} and sets r to \textsf{NIL} 
+\Notes 
+Does not verify if \textsf{R} is assigned first. 
+\end{procedure}
+
+\begin{function}{NewReference}
+\Declaration
+function NewReference(Const R : TReference) : pReference;
+\Description 
+Allocates in the heap a copy of the reference \textsf{r} and returns that
+allocated pointer.
+\end{function}
+
+\begin{functionl}{Del{\_}Reference}{delreference}
+\Declaration
+procedure Del{\_}Reference(Const Ref : tReference);
+\Description 
+Free up all address registers allocated in this reference for the index and
+base (if required). 
+\Notes 
+Does not free the reference symbol if it exists. 
+\end{functionl}
+
+\begin{functionl}{New{\_}Reference}{resetreference}
+\Declaration
+Function New{\_}Reference(Base : TRegister;Offset : Longint) : PReference;
+\Description 
+Allocates a reference pointer, clears all the fields to zero, and sets the
+offset to the offset field and the base to the base fields of the newly
+allocated reference. Returns this newly allocated reference. 
+\end{functionl}
+
+\begin{procedurel}{Reset{\_}Reference}{resetreference}
+\Declaration
+procedure Reset{\_}Reference(var ref : treference);
+\Description 
+Clears all fields of the reference. 
+\end{procedurel}
+
+\subsection{The register allocator subsystem}
+\label{subsec:mylabel7}
+
+\subsubsection{Architecture}
+\label{subsubsec:architecture}
+
+This system allocates and deallocates registers, from a pool of free
+registers. Each time the code generator requires a register for generating
+assembler instructions, it either calls the register allocator subsystem to
+get a free register or directly uses the scratch registers (which are never
+allocated in a pool except in the optimization phases of the compiler).
+
+The code generator when no longer referencing the register should deallocate 
+it so it can be used once again.
+
+\subsubsection{Code generator interface (tgen.pas)}
+\label{subsubsec:mylabel29}
+
+The following interface routines are used by the code generator to allocate 
+and deallocate registers from the different register pools available to code 
+generator.
+
+\paragraph{General purpose registers}
+
+\begin{function}{GetRegister32}
+\Declaration
+function GetRegister32 : tregister;
+\Description 
+Allocates and returns a general purpose (integer) register which can be used
+in the code generator. The register, when no longer used should be
+deallocated with ungetregister32() or ungetregister() 
+\Notes 
+On non 32-bit machines, this routine should return the normal register for
+this machine (eg : 64-bit machines will alloate and return a 64-bit
+register). 
+\end{function}
+
+\begin{procedure}{GetRegisterPair}
+\Declaration
+procedure GetRegisterPair(var low, high : TRegister);
+\Description
+Returns a register pair to be used by the code generator when accessing
+64-bit values on 32-bit wide register machines. 
+\Notes 
+On machines which support 64-bit registers naturally, this routine should
+never be used, it is intended for 32-bit machines only.par Some machines
+support 64-bit integer operations using register 32-bit pairs in hardware,
+but the allocated registers must be specific, this routine is here to
+support these architectures.
+\end{procedure}
+
+\begin{procedure}{UngetRegister32}
+\Declaration
+Procedure UnGetRegister32(R : TRegister);
+\Description 
+Deallocates a general purpose register which was previously allocated with
+\seef{GetRegister32}().
+\end{procedure}
+
+\paragraph{Floating point registers}
+
+\begin{function}{GetFloatRegister}
+\Declaration
+Function GetFloatRegister : tregister;
+\Description 
+Allocates and returns a floating point register which can be used in the
+code generator. The register, when no longer used should be deallocated with
+ungetregister(). The register returned is a true floating point register (if
+supported). 
+\Notes 
+This routine should only be used when floating point hardware is present in
+the system. For emulation of floating point, the general purpose register
+allocator / deallocator routines should be used instead. 
+\end{function}
+
+\begin{function}{IsFloatsRegister}
+\Declaration
+Function IsFloatsRegister(R : TRegister): Boolean;
+\Description
+Returns TRUE if the register r is actually a floating point register,
+otherwise returns FALSE. This is used when the location is LOC{\_}FPU on
+machines which do not support true floating point registers. 
+\end{function}
+
+\paragraph{Address registers}
+
+\begin{function}{GetAdressReg}
+\Declaration
+Function GetAddressReg : tregister;
+\Description 
+Allocates and returns an address register which can be used for address
+related opcodes in the code generator. The register, when no longer used
+should be deallocated with ungetregister() 
+\Notes 
+If there is no distinction between address registers, and general purpose
+register in the architecture, this routine may simply call and return the
+getregister32() result. 
+\end{function}
+
+\begin{function}{IsAddressRegister}
+\Declaration
+Function IsAddressRegister(r : TRegister): Boolean;
+\Description 
+Returns TRUE if the register r is actually an address register, otherwise
+returns FALSE.
+\Notes 
+If there is no distinction between address registers, and general purpose
+register in the architecture, this routine may simply verify if this is a
+general purpose register and return TRUE in that case. 
+\end{function}
+
+\paragraph{Generic}
+
+\begin{procedure}{UngetRegister}
+\Declaration
+procedure UngetRegister(r : TRegister);
+\Description
+Deallocates any register which was previously allocated with any of the
+allocation register routines. 
+\end{procedure}
+
+\begin{function}{SaveUsedRegisters}
+\Declaration
+procedure SaveUsedRegisters(var Saved : TSaved; ToSave: TRegisterset);
+\Description 
+Saves in a temporary location all specified registers. On stack based
+machines the registers are saved on the stack, otherwise they are saved in a
+temporary memory location. The registers which were saved are stored in the
+\textsf{saved} variable. The constant \textsf{ALL{\_}REGISTERS} passed to
+the \textsf{tosave} parameter indicates to save all used registers. 
+\end{function}
+
+\begin{function}{RestoreUsedRegisters}
+\Declaration
+procedure restoreusedregisters(Saved : TSaved);
+\Description 
+Restores all saved registers from the stack (or a temporary memory
+location). Free any temporary memory space allocated, if necessary.
+\end{function}
+
+\paragraph{Debugging}
+
+\begin{function}{GetExplicitRegister32}
+\Declaration
+Function GetExplicitRegister32(r : tregister): tregister;
+\Description 
+This routine allocates specifically the specified register \textsf{r }and
+returns that register. The register to allocate can only be one of the
+scratch registers. 
+\Notes 
+This routine is used for debugging purposes only. It should be used in
+conjunctions with ungetregister32() to explicitly allocate and deallocate a
+scratch register. 
+\end{function}
+
+\subsection{Temporary memory allocator subsystem}
+\label{subsec:temporary}
+
+\subsubsection{Architecture}
+\label{subsubsec:architecturemory}
+
+Sometimes it is necessary to reserve temporary memory locations on the stack 
+to store intermediate results of statements. This is done by the temporary 
+management module. 
+
+Since entry and exit code for routines are added after the code for the 
+statements in the routine have been generated, temporary memory allocation 
+can be used `on the fly' in the case where temporary memory values are 
+required in the code generation phase of the routines being compiled. After 
+usage, the temporary memory space should be freed, so it can be reused if 
+necessary.
+
+The temporary memory allocation is a linked list of entries containing 
+information where to access the data via a negative offset from the 
+frame{\_}pointer register. The linked list is only valid when compiling and 
+generating the code for the procedure bodies; it is reset and cleared each 
+time a new routine is compiled. There are currently three different types of 
+memory spaces in use : volatile (\textsf{tt{\_}normal}) which can be 
+allocated and freed any time in the procedure body, ansistring, which is 
+currently the same as volatile, except it only stored references to 
+ansistring's, and persistent (\textsf{tt{\_}persistent}) which are memory 
+blocks which are reserved throughout the routine duration; persistent 
+allocated space can never be reused in a procedure body, unless explicitly 
+released.
+
+The temporary memory allocator guarantees to allocate memory space on the 
+stack at least on a 16-bit alignment boundary. The exact alignment depends 
+on the operating system required alignment.
+
+\subsubsection{Temporary memory allocator interface (temp{\_}gen.pas)}
+\label{subsubsec:temporary}
+
+\paragraph{volatile / ansistring memory}
+
+\begin{function}{GetTempOfSize}
+\Declaration
+function GetTempOfSize(Size : Longint) : Longint;
+\Description 
+Allocates at least \textsf{size} bytes of temporary volatile memory on the
+stack. The return value is the negative offset from the frame pointer where
+this memory was allocated. 
+\Notes 
+The return offset always has the required alignment for the target system,
+and can be used as an offset from the frame{\_}pointer to access the
+temporary space. 
+\end{function}
+
+\begin{procedure}{GetTempOfSizeReference}
+\Declaration
+procedure GetTempOfSizeReference(l : Longint;Var Ref : TReference);
+\Description 
+This routine is used to assign and allocate extra temporary volatile memory
+space on the stack from a reference. \textsf{l} is the size of the
+persistent memory space to allocate, while \textsf{ref} is a reference entry
+which will be set to the correct offset from the frame{\_}pointer register
+base. The \textsf{offset} and \textsf{base} fields of \textsf{ref} will be
+set appropriately in this routine, and can be considered valid on exit of
+this routine. 
+\Notes 
+The return offset always has the required alignment for the target system.
+\end{procedure}
+
+\begin{procedure}{UnGetIfTemp}
+\Declaration
+procedure UnGetIfTemp(const ref : treference);
+\Description 
+Frees a reference \textsf{ref} which was allocated in the volatile temporary
+memory space.  
+\Notes 
+The freed space can later be reallocated and reused. 
+\end{procedure}
+
+\begin{procedure}{GetTempAnsiStringReference}
+\Declaration
+procedure GetTempAnsiStringReference(Var Ref : TReference);
+\Description 
+Allocates \textsf{ref }on the volatile memory space and sets the
+\textsf{base} to the frame{\_}pointer register and \textsf{offset} to the
+correct offset to access this allocated memory space. 
+\Notes 
+The return offset always has the required alignment for the target system.
+\end{procedure}
+
+\paragraph{persistent memory}
+
+\begin{function}{GetTempOfSizePersistant}
+\Declaration
+function GetTempOfSizePersistant(Size : Longint) :Longint;
+\Description 
+Allocates persistent storage space on the stack. return value is the
+negative offset from the frame pointer where this memory was allocated. 
+\Notes 
+The return offset always has the required alignment for the target system.
+\end{function}
+
+\begin{function}{UngetPersistantTemp}
+\Declaration
+procedure UngetPersistantTemp(Pos : Longint);
+\Description 
+Frees space allocated as being persistent. This persistent space can then
+later be used and reallocated. \textsf{pos} is the offset relative to the
+frame{\_}pointer of the persistent memory block to free. 
+\end{function}
+
+\paragraph{utility routines}
+
+\begin{procedure}{ResetTempGen}
+\Declaration
+procedure ResetTempGen;
+\Description 
+Clear and free the complete linked list of temporary memory locations. The
+list is set to nil. 
+\Notes 
+This routine is called each time a routine has been fully compiled. 
+\end{procedure}
+
+\begin{procedure}{SetFirstTemp}
+\Declaration
+procedure SetFirstTemp(l : Longint);
+\Description 
+This routine sets the start of the temporary local area (this value is a
+negative offset from the frame{\_}pointer, which is located after the local
+variables). Usually the start offset is the size of the local variables,
+modified by any alignment requirements. 
+\Notes 
+This routine is called once before compiling a routine, it indicates the
+start address where to allocate temporary memory space. 
+\end{procedure}
+
+\begin{function}{GetFirstTempSize}
+\Declaration
+function GetFirstTempSize : longint;
+\Description 
+Returns the total number of bytes allocated for local and temporary
+allocated stack space. This value is aligned according to the target system
+alignment requirements, even if the actual size is not aligned. 
+\Notes 
+This routine is used by the code generator to get the total number of bytes
+to allocate locally (i.e the stackframe size) in the entry and exit code of
+the routine being compiled. 
+\end{function}
+
+\begin{function}{NormalTempToPersistant}
+\Declaration
+Procedure NormalTempToPersistant(Pos : Longint);
+\Description
+Searches the list of currently temporary memory allocated for the one with
+the offset \textsf{pos, }and if found converts this temporary memory space
+as persistent (can never be freed and reallocated). 
+\end{function}
+
+\begin{function}{PersistantTempToNormal}
+\Declaration
+Procedure PersistantTempToNormal(Pos : Longint);
+\Description 
+Searches the list of currently allocated persistent memory space as the
+specified address \textsf{pos }, and if found converts this memory space to
+normal volatile memory space which can be freed and reused. 
+\end{function}
+
+\begin{function}{IsTemp}
+\Declaration
+function IsTemp(const Ref : TReference): boolean;
+\Description 
+Returns TRUE if the reference \textsf{ref }is allocated in temporary
+volatile memory space, otherwise returns FALSE. 
+\end{function}
+
+\subsection{Assembler generation}
+\label{subsec:mylabel8}
+
+\subsubsection{Architecture}
+\label{subsubsec:architectureneration}
+
+The different architectures on the market today only support certain types 
+of operands as assembler instructions. The typical format of an assembler 
+instruction has the following format:
+
+\begin{center}
+\textsf{OPCODE [opr1,opr2[,opr3][\ldots ]]}
+\end{center}
+
+The opcode field is a mnemonic for a specific assembler instruction, such as 
+\textsf{MOV} on the 80x86, or \textsf{ADDX} on the 680x0. Furthermore, in 
+most cases, this mnemonic is followed by zero to three operands which can be 
+of the following types:
+
+Possible Operand Types 
+\begin{itemize}
+\item a LABEL or SYMBOL (to code or data) 
+\item a REGISTER (one of the predefined hardware registers)  
+\item a CONSTANT (an immediate value) 
+\item a MEMORY EXPRESSION (indirect addressing through offsets, symbols, and
+     address registers)
+\end{itemize}
+
+In the compiler, this concept of different operand types has been directly 
+defined for easier generation of assembler output. All opcodes generated by 
+the code generator are stored in a linked list of opcodes which contain 
+information on the operand types, The opcode and the size (which is 
+important to determine on what size the operand must be operated on) are 
+stored in that linked list. 
+
+The possible operand sizes for the code generator are as follows (a 
+enumeration of type \textsf{topsize}):
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Operand size enum (\textsf{topsize}) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{S{\_}B}& 			8-bit integer operand \\
+\textsf{S{\_}W}& 			16-bit integer operand \\
+\textsf{S{\_}L}& 			32-bit integer operand \\
+\textsf{S{\_}Q}& 			64-bit integer operand \\
+\textsf{S{\_}FS}& 			32-bit IEEE 754 Single floating point operand \\
+\textsf{S{\_}FL}& 			64-bit IEEE 754 Double floating point operand \\
+\textsf{S{\_}FX}& 			Extended point floating point operand (cpu-specific) \\
+\textsf{S{\_}CPU}&			A constant equal to one of the previous sizes (natural size of operands) \\
+\end{longtable}
+
+The possible operand types for the code generator are as follows (other 
+might be added as required by the target architecture):
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Operand type (\textsf{toptype}) & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{top{\_}none}& 			No operand \\
+\textsf{top{\_}reg}& 			Operand is a register \\
+\textsf{top{\_}ref}& 			Operand is a reference (\textsf{treference} type) \\
+\textsf{top{\_}symbol}& 		Operand is a symbol (reference or label) \\
+\end{longtable}
+
+The architecture specific opcodes are done in an enumeration of type 
+\textsf{tasmop}. An example of an enumeration for some of the opcodes of the 
+PowerPC 32-bit architecture is as follows:
+
+\begin{lstlisting}{}
+type tasmop = (a_add, a_add_, a_addo, a_addo_, a_addc, a_addc_, a_addco,
+	       a_addco_,a_adde, a_adde_, a_addeo, a_addeo_, a_addi, 
+	       a_addic, a_addic_, a_addis \ldots 
+\end{lstlisting}
+
+\subsubsection{Generic instruction generation interface}
+\label{subsubsec:generic}
+
+To independently generate code for different architectures, wrappers for the 
+most used instructions in the code generator have been created which are 
+totally independent of the target system. 
+
+\paragraph{Load / store instructions}
+
+\begin{procedurel}{Emit\_Load\_Loc\_Reg}{EmitLoadLocReg}
+\Declaration
+Procedure Emit{\_}Load{\_}Loc{\_}Reg(src:tlocation;srcdef:pdef; dstdef : pdef; dst : tregister);
+\Description 
+Loads an operand from the source location in \textsf{src }into the
+destination register \textsf{dst }taking into account the source definition
+and destination definition (sign-extension, zero extension depending on the
+sign and size of the operands).
+\Notes 
+The source location can only be in LOC{\_}REGISTER, LOC{\_}CREGISTER,
+LOC{\_}MEM or LOC{\_}REFERENCE otherwise an internal error will occur. This
+generic opcode does not work on floating point values, only integer values.
+\end{procedurel}
+
+\begin{procedure}{FloatLoad}
+\Declaration
+procedure FloatLoad(t : tFloatType;Ref : TReference; Var Location:TLocation);
+\Description 
+This routine is to be called each time a location must be set to LOC{\_}FPU
+and a value loaded into a FPU register
+\Notes 
+The routine sets up the register field of LOC{\_}FPU correctly. The source
+location can only be : LOC{\_}MEM or LOC{\_}REFERENCE. The destination
+location is set to LOC{\_}FPU. 
+\end{procedure}
+
+\begin{function}{FloatStore}
+\Declaration
+procedure FloatStore(t : TFloatType;var Location:TLocation; ref:TReference);
+\Description 
+This routine is to be called when a value located in LOC{\_}FPU must be
+stored into memory. 
+\Notes 
+The destination must be LOC{\_}REFERENCE or LOC{\_}MEM. This routine frees
+the LOC{\_}FPU location \\
+\end{function}
+
+\begin{functionl}{emit{\_}mov{\_}ref{\_}reg64}{emitmovrefreg64}
+\Declaration
+Procedure Emit{\_}Mov{\_}Ref{\_}Reg64(r : TReference;rl,rh : TRegister);
+\Description 
+This routine moves a 64-bit integer value stored in memory location
+\textsf{r} into the low 32-bit register \textsf{rl} and the high 32-bit
+register \textsf{rh}. 
+\end{functionl}
+
+\paragraph{Load address}
+
+\begin{functionl}{Emit{\_}Lea{\_}Loc{\_}Ref}{emitlealocref}
+\Declaration
+procedure Emit{\_}Lea{\_}Loc{\_}Ref(const t:TLocation;Const Ref:TReference; FreeTemp:Boolean);
+\Description 
+Loads the address of the location \textsf{loc }and stores the result into
+\textsf{ref}
+\Notes 
+The store address \textsf{ref }should point to an allocated area at least
+\textsf{sizeof(pointer)} bytes, otherwise unexpected code might be
+generated. 
+\end{functionl}
+
+\begin{functionl}{Emit{\_}Lea{\_}Loc{\_}Reg}{Emitlealocreg}
+\Declaration
+Procedure Emit{\_}Lea{\_}Loc{\_}Reg(const t:TLocation;Reg:TRegister;Freetemp:Boolean);
+\Description 
+Loads the address of the location \textsf{loc }and stores the result into
+ther target register \textsf{reg}
+\end{functionl}
+
+\paragraph{Label instructions}
+
+\begin{procedure}{GetLabel}
+\Declaration
+procedure GetLabel(var l : pAsmLabel);
+\Description 
+Returns a label associated with code. This label can then be used with the
+instructions output by the code generator using the instruction generation
+templates which require labels as parameters. The label itself can be
+emitted to the assembler source by calling the \textsf{emitlab} routine.
+\end{procedure}
+
+\begin{procedure}{EmitLab}
+\Declaration
+procedure EmitLab(var l : pasmlabel);
+\Description 
+Output the label \textsf{l }to the assembler instruction stream. 
+\Notes 
+The label should have been previously allocated with \textsf{getlabel.} The
+output label will be of the form label: in the instruction stream. This
+label is usually a jump target. 
+\end{procedure}
+
+\begin{procedure}{EmitLabeled}
+\Declaration
+procedure EmitLabeled(op : tasmop; var l : pasmlabel);
+\Description 
+Output the opcode \textsf{op }with the operand \textsf{l} 
+which is a previously allocated label. 
+\Notes 
+This routine is used to output jump instructions such as : jmp label, jne
+label.  The label should have been previously allocated with a call to
+\textsf{getlabel}
+
+\end{procedure}
+
+\paragraph{Other instructions}
+
+\begin{function}{EmitCall}
+\Declaration
+procedure EmitCall(const routine:string);
+\Description 
+Emit a call instruction to an internal routine 
+\Parameters
+routine = The name of the routine to call.
+\end{function}
+
+\begin{procedure}{ConcatCopy}
+\Declaration
+procedure ConcatCopy(Source,Dest : TReference;Size : Longint;DelSource : Boolean; loadref:boolean);
+\Description 
+This routine copies \textsf{size} data from the \textsf{source} reference to the destination \textsf{dest} reference. \\
+\Parameters 
+source = Source reference to copy from \par 
+dest = Depending on the value of loadref, either indicates a location where a 
+pointer to the data to copy is stored, or this reference directly the address 
+to copy to. \par 
+size = Number of bytes to copy \par delsource = TRUE if the source reference 
+should be freed in this routine \par loadref = TRUE if the source reference 
+contains a pointer to the address we wish to copy to, otherwise the reference 
+itself is the destination location to copy to. 
+\end{procedure}
+
+\begin{procedurel}{Emit{\_}Flag2Reg}{emitflag2reg}
+\Declaration
+procedure Emit{\_}Flag2Reg(Flag:TResflags;HRegister:TRegister);
+\Description 
+Sets the value of the register to 1 if the condition code flag in \textsf{flag}
+is TRUE, otherwise sets the register to zero. 
+\Notes 
+The operand should be zero extended to the natural register size for the 
+target architecture.
+\end{procedurel}
+
+\subsubsection{Instruction generation interface}
+\label{subsubsec:instruction}
+
+\section{The assembler output}
+\label{sec:mylabel8}
+
+All code is generated via special linked lists of instructions. The base of 
+this is a special object, an abstract assembler which implements all 
+directives which are usually implemented in the different assemblers 
+available on the market . When the code generator and parser generates the 
+final output, it is generated as a linked list for each of the sections 
+available for the output assembler. Each entry in the linked list is either 
+an instruction, or one of the abstract directives for the assembler. 
+
+\begin{figure}
+\ifpdf
+\includegraphics{arch11.pdf}
+%\epsfig{file=arch11.png,width=\textwidth}
+\else
+\includegraphics[width=5.67in,height=2.17in]{arch11.eps}
+\fi
+\label{fig11}
+\caption{Assembler generation organisation}
+\end{figure}
+
+% FIXME
+% If I don't do this, the assembler node table has a problem.
+\clearpage
+
+The different possible sections which are output are as follows:
+
+\begin{center}
+Section lists for the assembler output
+\end{center}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Internal section name & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+exparasmlist    & temporary list \\
+datasegment     & initialized variables \\
+codesegment     & instructions and general code directives \\
+debuglist       & debugging information \\
+withdebuglist   & ??????????????? \\
+consts          & read only constants \\
+importsection   & imported symbols \\
+exportsection   & exported symbols \\
+resourcesection & Resource data \\
+rttilist        & runtime type information data \\
+resourcestringlist& resource string data
+\end{longtable}
+
+The following directives for the abstract assembler currently exist: 
+
+Abstract assembler node types:
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Node entry Type   & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+ait{\_}none& 
+    This entry in the linked list is invalid (this should
+    normally never occur) \\
+ait{\_}direct& 
+    Direct output to the resulting assembler file (as string) \\
+ait{\_}string& 
+    Shortstring with a predefined length \\
+ait{\_}label& 
+    Numbered assembler label used for jumps \\
+ait{\_}comment& 
+    Assembler output comment \\
+ait{\_}instruction& 
+    Processor specific instruction \\
+ait{\_}datablock& 
+    Unitialized data block (BSS) \\
+ait{\_}symbol& 
+    Entry represents a symbol (exported, imported, or other public
+    symbol type) \newline
+    Possible symbol types : NONE, EXTERNAL, LOCAL and GLOBAL \newline
+    eg : A symbol followed by an ait{\_}const{\_}32bit \\
+ait{\_}symbol{\_}end & 
+    Symbol end (for example the end of a routine) \\
+ait{\_}const{\_}32bit& 
+    Initialized 32-bit constant (without a symbol) \\
+ait{\_}const{\_}16bit&
+    Initialized 16-bit constant (without a symbol) \\
+ait{\_}const{\_}8bit& 
+    Initialized 8-bit constant (without a symbol) \\
+ait{\_}const{\_}symbol & ???????????? \\
+ait{\_}real{\_}80bit (x86)& 
+    Initialized 80-bit floating point constant (without symbol) \\
+ait{\_}real{\_}64bit& 
+    Initialized Double IEEE floating point constant (without symbol) \\
+ait{\_}real{\_}32bit& 
+    Initialized Single IEEE floating point constant (without symbol) \\
+ait{\_}comp{\_}64bit (x86)& 
+    Initialized 64-bit floating point integer (without symbol) \\
+ait{\_}align& 
+    Alignment directive \\
+ait{\_}section& 
+    Section directive \\
+ait{\_}const{\_}rva (Win32)&  \\
+ait{\_}stabn &
+    stabs debugging information (numerical value) \\
+ait{\_}stabs &
+    stabs debugging information (string) \\
+ait{\_}force{\_}line& 
+    stabs debugging line information \\
+ait{\_}stab{\_}function{\_}name& 
+    stabs debug information routine name \\
+ait{\_}cut& 
+    Cut in the assembler files (used for smartlinking) \\
+ait{\_}regalloc& 
+    Debugging information for the register allocator \\
+ait{\_}marker  & ???????????? \\
+ait{\_}frame (Alpha)&  \\
+ait{\_}ent (Alpha)&  \\
+ait{\_}labeled{\_}instruction (m68k)&  \\
+ait{\_}dummy & Unused - should never appear
+\end{longtable}
+
+\section{The Runtime library}
+\label{sec:mylabel9}
+
+This section describes the requirements of the internal routines which MUST 
+be implemented for all relevant platforms to port the system unit to a new 
+architecture or operating system. 
+
+The following defines are available when compiling the runtime library:
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Define Name & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+i386        & Intel 80x86 family of processors (and compatibles) \\
+m68k        & Motorola 680x0 family of processors (excludes coldfire) \\
+alpha       & Alpha 21x64 family of processors \\
+powerpc     & Motorola / IBM 32-bit family of processors \\
+sparc       & SPARC v7 compatible processors
+\end{longtable}
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Define name & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+RTLLITE& 
+    Removes some extraneous routine from compilation (system unit
+    is minimal). Mvdv: Afaik the status of this is unknown \\
+DEFAULT{\_}EXTENDED& 
+
+    The runtime library routines dealing with fixed point values have the
+    \textsf{extended} type instead of the \textsf{real} type. \\
+SUPPORT{\_}SINGLE& 
+    The compiler supports the \textsf{single} floating point precision type \\
+SUPPORT{\_}DOUBLE& 
+    The compiler supports the \textsf{double }floating point precision type \\
+SUPPORT{\_}EXTENDED& 
+    The compiler supports the \textsf{extended }floating point
+    precision type \\
+SUPPORT{\_}FIXED& 
+    The compiler supports the \textsf{fixed} floating point precision type \\
+HASWIDECHAR& 
+    The compiler supported the \textsf{widechar} character type \\
+INT64& 
+    The compiler supports 64-bit integer operations \\
+MAC{\_}LINEBREAK& 
+    Text I/O uses Mac styled line break ({\#}13) instead of {\#}13{\#}10 \\
+SHORT{\_}LINEBREAK& 
+    Text I/O uses UNIX styled line breaks ({\#}10) instead of {\#}13{\#}10 \\
+EOF{\_}CTRLZ& 
+    A Ctrl-Z character in a text file is an EOF marker (UNIX mostly) \\
+\end{longtable}
+
+The following defines are used for fexpand definitions:
+
+% FIXME Seem to miss a *nix symlink expand behaviour define.
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Define name & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+FPC{\_}EXPAND{\_}DRIVES& 
+    Different devices with different names (as drives) are
+    supported \par (like DOS, Netware, etc\ldots ) \\
+FPC{\_}EXPAND{\_}UNC& 
+    Universal Naming convention support i.e \par $\backslash \backslash
+    < $server-name>$\backslash $<share-name>$\backslash $<directory/filename> \\
+UNIX& 
+    Unix style file names \\
+FPC{\_}EXPAND{\_}VOLUMES& 
+    Volume names (i.e. drive descriptions longer than 1
+    character) are supported. \\
+FPC{\_}EXPAND{\_}TILDE& 
+    Replaces the $\sim $ character, with the `HOME' directory
+    (mostly on UNIX platforms) \\
+\end{longtable}
+
+The following defines some debugging routines for the runtime library:
+
+\begin{longtable}{|l|p{10cm}|}
+\hline
+Define Name & Description \\
+\hline
+\endhead
+\hline
+\endfoot
+DEFINE NAME     & Description \\
+ANSISTRDEBUG    & Add Debug routines for ansi string support \\
+EXCDEBUG        & Add Debug routines for exception debugging \\
+LOGGING         & Log the operations to a file \\
+\end{longtable}
+
+\subsection{Operating system hooks}
+\label{subsec:operating}
+
+This section contains information on all routines which should be hooked and 
+implemented to be able to compile and use the system unit for a new 
+operating system:
+
+\begin{functionl}{System{\_}Exit}{systemexit}
+\Declaration
+procedure System{\_}Exit;
+\Description 
+This routine is internally called by the system unit when the application
+exits.
+\Notes 
+This routine should actually exit the application. It should exit with the
+error code specified in the \textsf{ExitCode} variable.
+\Algorithm 
+Exit application with ExitCode value.
+\end{functionl}
+
+\begin{function}{ParamCount}
+\Declaration
+Function ParamCount : Longint;
+\end{function}
+
+\begin{procedure}{Randomize}
+\Declaration
+Procedure Randomize;
+\Description 
+This routine initializes the built-in random generator with a random value. 
+\Notes 
+This routine is used by random 
+\Algorithm
+Randseed := pseudo random 32-bit value
+\end{procedure}
+
+\begin{function}{GetHeapStart}
+\Declaration
+Function GetHeapStart : Pointer;
+\Description 
+This routine should return a pointer to the start of the heap area. 
+\Notes 
+GetHeapStart := address of start of heap.
+\end{function}
+
+\begin{function}{GetHeapSize}
+\Declaration
+Function GetHeapSize : Longint;
+\Description 
+This routine should return the total heap size in bytes 
+\Parameters 
+\Algorithm
+GetHeapSize := total size of the initial heap area.
+\end{function}
+
+\begin{function}{sbrk}
+\Declaration
+Function sbrk(Size : Longint): Longint;
+\Description 
+\end{function}
+
+\begin{procedurel}{Do{\_}Close}{doclose}
+\Declaration
+Procedure Do{\_}Close(Handle : Longint);
+\Description 
+This closes the file specified of the specified handle number. 
+\Parameters 
+handle = file handle of file to close 
+\Notes 
+This routine should close the specified file. 
+\end{procedurel}
+
+\begin{functionl}{Do{\_}Erase}{doerase}
+\Declaration
+procedure Do{\_}Erase(p: pchar);
+\Description 
+This erases the file specifed by p. 
+\Parameters 
+p = name of the file to erase 
+\Notes 
+\end{functionl}
+
+The following variables should also be defined for each new operating 
+system, they are used by external units:
+
+\noindent
+argc : The number of command line arguments of the program
+
+\noindent
+argv : A pointer to each of the command line arguments (an array of pchar 
+pointers)
+
+\subsection{CPU specific hooks}
+\label{subsec:mylabel9}
+
+The following routines must absolutely be implemented for each processor, as
+they are dependent on the processor:
+
+\subsubsection{FPC{\_}SETJMP}
+\label{subsubsec:mylabel30}
+
+\begin{function}{SetJmp}
+\Declaration
+function SetJmp (Var S : Jmp{\_}Buf) : Longint;
+\Description 
+A call to SetJmp(), saves the calling environment in its \textsf{s} argument
+for later use by \textsf{longjmp()}. Called by the code generator in
+exception handling code. The return value should be zero.
+\Notes 
+This routine should save / restore all used registers (except the
+accumulator which should be cleared).
+\end{function}
+
+\subsubsection{FPC{\_}LONGJMP}
+\label{subsubsec:mylabel31}
+
+\subsubsection{function SPtr()}
+\label{subsubsec:function}
+
+\subsubsection{function Get{\_}Caller{\_}Frame(framebp:longint):longint;}
+\label{subsubsec:mylabel32}
+
+\subsubsection{function Get{\_}Caller{\_}Addr(framebp:longint):longint;}
+\label{subsubsec:mylabel33}
+
+\subsubsection{function Get{\_}Frame:longint;}
+\label{subsubsec:mylabel34}
+
+\subsubsection{function Trunc()}
+\label{subsubsec:mylabel35}
+
+\subsection{String related}
+\label{subsec:string}
+
+\subsubsection{FPC{\_}SHORTSTR{\_}COPY}
+\label{subsubsec:mylabel36}
+
+\begin{procedurel}{Int{\_}StrCopy}{intstrcopy}
+\Declaration
+Procedure Int{\_}StrCopy(len:longint;sstr,dstr:pointer);
+\Description 
+This routine copies the string pointed to by the address in sstr, to the
+string pointed in the destination. The old string is overwritten, and the
+source string will be truncated to make it fit in destination if the length
+of the source is greater then destination string len (the len parameter).
+\Parameters 
+len = maximum length to copy (the destination string length) \par 
+sstr = pointer to source shortstring \par 
+dstr = point to destination shortstring
+\Notes 
+Called by code generator when a string is assigned to another string. 
+\end{procedurel}
+
+\subsubsection{FPC{\_}SHORTSTR{\_}COMPARE}
+\label{subsubsec:mylabel37}
+
+\begin{functionl}{Int{\_}StrCmp}{intstrcmp}
+\Declaration
+Function Int{\_}StrCmp(dstr,sstr:pointer) : longint;
+\Description 
+The routine compares two shortstrings, and returns 0 if both are equal, 1 if
+\textsf{dest} is greater then \textsf{src}, otherwise it returns --1.
+\Notes 
+Both pointers must point to shortstrings. Length checking must be performed
+in the routine.
+\end{functionl}
+
+\subsubsection{FPC{\_}SHORTSTR{\_}CONCAT}
+\label{subsubsec:mylabel38}
+
+\begin{procedurel}{Int{\_}StrConcat}{intstrconcat}
+\Declaration
+Procedure Int{\_}StrConcat(src,dest:pointer);
+\Description 
+This routine appends the string pointed to by \textsf{src} to the end of the
+string pointed to by \textsf{dest}.
+\Parameters 
+src  = pointer to shortstring to append to dest \par 
+dest = pointer to shortstring to receive appended string
+\Notes 
+Both pointers must point to shortstrings. In the case where the src string
+length does not fit in dest, it is truncated.
+\Algorithm
+\begin{lstlisting}{}
+if src =nil or dest = nil then  
+ exit routine; 
+if (src string length + dest string length) > 255 then 
+ number of bytes to copy = 255 -- dest string length
+else
+ number of bytes to copy = src string length;
+copy the string data (except the length byte)
+dest string length = dest string length + number of bytes to copied
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}ANSISTR{\_}CONCAT}
+\label{subsubsec:mylabel39}
+
+\begin{procedurel}{AnsiStr{\_}Concat}{ansistrconcat}
+\Declaration
+Procedure AnsiStr{\_}Concat(s1,s2:Pointer;var s3:Pointer);
+\Description 
+This routine appends \textsf{s1}+\textsf{s2} and stores the result at the
+address pointed to by \textsf{s3}.
+\Notes 
+All pointers must point to ansistrings.  
+\end{procedurel}
+
+\subsubsection{FPC{\_}ANSISTR{\_}COMPARE}
+\label{subsubsec:mylabel40}
+
+\begin{functionl}{AnsiStr{\_}Compare}{ansistrcompare}
+\Declaration
+Function AnsiStr{\_}Compare(s1,s2 : Pointer): Longint;
+\Description 
+The routine compares two ansistrings, and returns 0 if both are equal, 1 if
+\textsf{s1} is greater then \textsf{s2}, otherwise it returns --1.
+\Parameters 
+Both pointers must point to ansistrings. 
+\end{functionl}
+
+\subsubsection{FPC{\_}ANSISTR{\_}INCR{\_}REF }
+\label{subsubsec:mylabel41}
+
+\begin{procedurel}{AnsiStr{\_}Incr{\_}Ref}{ansistrincrref}
+\Declaration
+procedure AnsiStr{\_}Incr{\_}Ref (var s : Pointer);
+\Description 
+This routine simply increments the ANSI string reference count, which is
+used for garbage collection of ANSI strings.
+\Parameters 
+s = pointer to the ansi string (including the header structure) 
+\end{procedurel}
+
+\subsubsection{FPC{\_}ANSISTR{\_}DECR{\_}REF }
+\label{subsubsec:mylabel42}
+
+\begin{procedurel}{AnsiStr{\_}Decr{\_}Ref}{ansistrdecrref}
+\Declaration
+procedure AnsiStr{\_}Decr{\_}Ref (Var S : Pointer);
+\Parameters 
+s = pointer to the ansi string (including the header structure) 
+\Algorithm
+Decreases the internal reference count of this non constant ansistring; If
+the reference count is zero, the string is deallocated from the
+heap.
+\end{procedurel}
+
+\subsubsection{FPC{\_}ANSISTR{\_}ASSIGN }
+\label{subsubsec:mylabel43}
+
+\begin{functionl}{AnsiStr{\_}Assign}{ansistrassign}
+\Declaration
+Procedure AnsiStr{\_}Assign (var s1 : Pointer;s2 : Pointer);
+\Parameters 
+s1 = address of ANSI string to be assigned to  \par
+s2 = address of ANSI string which will be assigned 
+\Algorithm
+Assigns S2 to S1 (S1:=S2), also by the time decreasing the reference count
+to S1 (it is no longer used by this variable).
+\end{functionl}
+
+\subsubsection{FPC{\_}PCHAR{\_}TO{\_}SHORTSTR}
+\label{subsubsec:mylabel44}
+
+\begin{function}{StrPas}
+\Declaration
+Function StrPas(p:pChar):ShortString;
+\Description 
+Copies and converts a null-terminated string (pchar) to a shortstring with
+length checking.
+\Parameters 
+p = pointer to null terminated string to copy 
+\Notes 
+Length checking is performed. Verifies also p=nil, and if so sets the
+shortstring length to zero. Called by the type conversion generated code of
+code generator.
+\Algorithm
+\begin{lstlisting}{}
+if p=nil then
+ string length =0 
+else
+ string length =string length(p) 
+ if string length>255 then 
+  string length = 255 
+ if string length>0 then
+  Copy all characters of pchar array to string (except length byte)
+\end{lstlisting}
+\end{function}
+
+\subsubsection{FPC{\_}SHORTSTR{\_}TO{\_}ANSISTR}
+\label{subsubsec:mylabel45}
+
+\begin{functionl}{FPC{\_}ShortStr{\_}To{\_}AnsiStr}{fpcshortstrtoansistr}
+\Notes 
+Called by the type conversion generated code of code generator. 
+\end{functionl}
+
+\subsubsection{FPC{\_}STR{\_}TO{\_}CHARARRAY}
+\label{subsubsec:mylabel46}
+
+\begin{procedurel}{Str{\_}To{\_}CharArray}{strtochararray}
+\Declaration
+procedure Str{\_}To{\_}CharArray(StrTyp, ArraySize: Longint; src,dest: pChar);
+\Description 
+Converts a string to a character array (currently supports both shortstring and ansistring types). Length checking is performed, and copies up to \textsf{arraysize} elements to dest. 
+\Parameters 
+strtyp = Indicates the conversion type to do (0 = shortstring, 1 =
+ansistring, 2 = longstring, 3 = widestring) \\ 
+arraysize = size of the destination array \par 
+src = pointer to source string \par 
+dest = pointer to character array
+\Notes 
+Called by the type conversion generated code of code generator when
+converting a string to an array of char. If the size of the string is less
+then the size of the array, the rest of the array is filled with zeros.
+\end{procedurel}
+
+\subsubsection{FPC{\_}CHARARRAY{\_}TO{\_}SHORTSTR}
+\label{subsubsec:mylabel47}
+
+\begin{function}{StrCharArray}
+\Declaration
+Function StrCharArray(p:pChar; l : Longint):ShortString;
+\Description 
+Copies a character array to a shortstring with length checking (upto 255
+characters are copied)
+\Parameters 
+p = Character array pointer \par 
+l = size of the array 
+\Notes 
+Called by the type conversion generated code of code generator when
+converting an array of char to a shortstring.
+\Algorithm
+\begin{lstlisting}{}
+if size of array >= 256 then  
+ length of string =255
+else 
+ if size of array < 0 then 
+  length of string = 0 
+ else
+  length of string = size of array
+ Copy all characters from array to shortstring
+\end{lstlisting}
+\end{function}
+
+\subsubsection{FPC{\_}CHARARRAY{\_}TO{\_}ANSISTR}
+\label{subsubsec:mylabel48}
+
+\begin{functionl}{Fpc{\_}Chararray{\_}To{\_}AnsiStr}{chararraytoansistr}
+\Notes 
+Called by the type conversion generated code of code generator when converting an array of char to an ansistring. 
+\end{functionl}
+
+\subsubsection{FPC{\_}CHAR{\_}TO{\_}ANSISTR}
+\label{subsubsec:mylabel49}
+
+\begin{functionl}{Fpc{\_}Char{\_}To{\_}AnsiStr}{fpcchartoansistr}
+\Notes 
+Called by the type conversion generated code of code generator when
+converting a char to an ansistring.
+\end{functionl}
+
+\subsubsection{FPC{\_}PCHAR{\_}TO{\_}ANSISTR}
+\label{subsubsec:mylabel50}
+
+\begin{functionl}{Fpc{\_}pChar{\_}To{\_}AnsiStr}{fpcpchartoansistr}
+\Notes 
+Called by the type conversion generated code of code generator when
+converting a pchar to an ansistring.
+\end{functionl}
+
+% maybe not necessary anymore (since the amount of tables decreased 
+% by "macrofying" the procedure definitions)
+\ifpdf 
+ \clearpage
+\fi
+
+\subsection{Compiler runtime checking}
+\label{subsec:compiler}
+
+\subsubsection{FPC{\_}STACKCHECK}
+\label{subsubsec:mylabel51}
+
+\begin{procedurel}{Int{\_}StackCheck}{intstackcheck}
+\Declaration
+procedure int{\_}stackcheck (stack{\_}size:longint;
+\Description 
+This routine is used to check if there will be a stack overflow when trying
+to allocate stack space from the operating system. The routine must preserve
+all registers. In the case the stack limit is reached, the routine calls the
+appropriate error handler.
+\Parameters 
+stack{\_}size = The amount of stack we wish to allocate 
+\Notes 
+Inserted in the entry code of a routine in the {\{}{\$}S+{\}} state by the code generator 
+\Algorithm
+\begin{lstlisting}{}
+if ((StackPointer -- stack{\_}size) < System.StackLimit) then
+ Throw a Runtime error with error code 202 (stack overflow)
+\end{lstlisting}
+\end{procedurel}
+
+\clearpage
+\subsubsection{FPC{\_}RANGEERROR}
+\label{subsubsec:mylabel52}
+
+\begin{procedurel}{Int{\_}RangeError}{intrangerror}
+\Declaration
+procedure Int{\_}RangeError;
+\Description 
+This routine is called when a range check error is detected when executing
+the compiled code. This usually simply calls the default error handler, with
+the correct runtime error code to produce.
+\Parameters 
+Inserted in code generator when a Runtime error 201 {\{}{\$}R+{\}} should be
+generated 
+\end{procedurel}
+
+\subsubsection{FPC{\_}BOUNDCHECK}
+\label{subsubsec:mylabel53}
+
+\begin{procedurel}{Int{\_}BoundCheck}{intboundcheck}
+\Declaration
+procedure Int{\_}BoundCheck(l : Longint; Range : Pointer);
+\Description 
+This routine is called at runtime in {\$}R+ mode to check if accessing
+indexes in a string or array is out of bounds. In this case, the default
+error handler is called, with the correct runtime error code to produce.
+\Parameters 
+l = Index we need to check  \par 
+range = pointer to a structure containing the minimum and maximum allowed
+indexes (points to two 32-bit signed values which are the limits of the
+array to verify).
+\Notes 
+Inserted in the generated code after assignments, and array indexing to
+verify if the result of operands is within range (in the {\{}{\$}R+{\}}
+state)
+\end{procedurel}
+
+\subsubsection{FPC{\_}OVERFLOW}
+\label{subsubsec:mylabel54}
+
+\begin{procedurel}{Int{\_}OverFlow}{intoverflow}
+\Declaration
+procedure Int{\_}OverFlow;
+\Description 
+This routine is called when an overflow is detected when executing the
+compiled code. This usually simply calls the default error handler, with the
+correct runtime error code to produce.
+\Parameters 
+Inserted in code generator when a Runtime error 215 {\{}{\$}Q+{\}} should be
+generated.
+\end{procedurel}
+
+\subsubsection{FPC{\_}CHECK{\_}OBJECT}
+\label{subsubsec:mylabel55}
+
+\begin{procedurel}{Int{\_}Check{\_}Object}{intcheckobject}
+\Declaration
+procedure Int{\_}Check{\_}Object(vmt : Pointer);
+\Description 
+This routine is called at runtime in the {\$}R+ state each time a virtual
+method is called. It verifies that the object constructor has been called
+first to build the VMT of the object, otherwise it throws an Runtime error 210.
+\Parameters 
+vmt = Current value of the SELF register 
+\Notes 
+Call inserted by the code generator before calling the virtual method. This
+routine should save / restore all used registers.
+\Algorithm
+\begin{lstlisting}{}
+if vmt = nil or size of method table =0 then
+ Throw a Runtime error with error code 210 (object not initialized)
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}CHECK{\_}OBJECT{\_}EXT}
+\label{subsubsec:mylabel56}
+
+\begin{procedurel}{Int{\_}Check{\_}Object{\_}Ext}{intcheckobjectext}
+\Declaration
+procedure Int{\_}Check{\_}Object{\_}Ext(vmt, expvmt : pointer);
+\Description 
+This routine is called at runtime when extended object checking is enabled (on the command line) and a virtual method is called. It verifies that the object constructor has been called first to build the VMT of the object, otherwise it throws an Runtime error 210, and furthermore it check that the object is actually a descendant of the parent object, otherwise it returns a Runtime error 220. 
+\Parameters
+vmt = Current value of the SELF register \par 
+expvmt = Pointer to TRUE object definition 
+\Notes 
+Call inserted by the code generator before calling the virtual method. \par 
+This routine should save / restore all used registers.
+\Algorithm
+\begin{lstlisting}{}
+if vmt = nil or size of method table =0 then 
+ Throw a Runtime error with error code 210 (object not initialized) 
+Repeat 
+ If SELF (VMT) <> VMT Address (expvmt) Then 
+  Get Parent VMT Address 
+ Else 
+  Exit;  
+until no more  ent;  
+Throw a Runtime error with error code 220 (Incorrect object reference)
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}IO{\_}CHECK}
+\label{subsubsec:mylabel57}
+
+\begin{procedurel}{Int{\_}IOCheck}{intiocheck}
+\Declaration
+procedure Int{\_}IOCheck(addr : longint);
+\Description
+This routine is called after an I/O operation to verify the success of the
+operation when the code is compiled in the {\$}I+ state.
+\Parameters 
+addr = currently unused
+\Algorithm 
+Check last I/O was successful, if not call error handler.
+\end{procedurel}
+
+\subsubsection{FPC{\_}HANDLEERROR}
+\label{subsubsec:mylabel58}
+
+\begin{procedure}{HandleError}
+\Declaration
+procedure HandleError (Errno : longint);
+\Description 
+This routine should be called to generate a runtime error either from one of
+the system unit routines or the code generator.
+\Parameters 
+Errno = Runtime error to generate 
+\Notes 
+This routine calls the appropriate existing error handler with the specified
+error code.
+\Algorithm 
+\end{procedure}
+
+\subsubsection{FPC{\_}ASSERT}
+\label{subsubsec:mylabel59}
+
+\begin{procedurel}{Int{\_}Assert}{intassert}
+\Declaration
+procedure Int{\_}Assert(Const Msg,FName:Shortstring;LineNo,ErrorAddr:Longint);
+\Description 
+This routine is called by the code generator in an assert statement. When
+the assertion fails, this routine is called.
+\Parameters  
+msg = string to print  \par 
+Fname = Current filename of source \par 
+LineNo = Current line number of source \par 
+ErrorAddr = Address of assertion failure 
+\end{procedurel}
+
+\subsection{Exception handling}
+\label{subsec:exception}
+
+\subsubsection{FPC{\_}RAISEEXCEPTION}
+\label{subsubsec:mylabel60}
+
+\begin{function}{RaiseExcept}
+\Declaration
+function RaiseExcept (Obj : Tobject; AnAddr,AFrame : Pointer) : Tobject;
+\Description 
+Called by the code generator in the raise statement to raise an exception.  
+\Parameters 
+Obj = Instance of class exception handler \par 
+AnAddr = Address of exception \par 
+Aframe = Exception frame address 
+\Notes 
+REGISTERS NOT SAVED??????????? 
+\end{function}
+
+\subsubsection{FPC{\_}PUSHEXCEPTADDR}
+\label{subsubsec:mylabel61}
+
+\begin{function}{PushExceptAddr}
+\Declaration
+function PushExceptAddr (Ft: Longint): PJmp{\_}buf ;
+\Description 
+This routine should be called to save the current caller context to be used
+for exception handling, usually called in the context where ANSI strings are
+used (they can raise exceptions), or in a try..finally or on statements to
+save the current context.
+\Parameters  
+Ft = Indicates the frame type on the stack (1= Exception frame or 2=Finalize
+frame)
+\Algorithm 
+Adds this item to the linked list of stack frame context information saved.
+Allocates a buffer for the jump statement and returns it.
+\end{function}
+
+\subsubsection{FPC{\_}RERAISE}
+\label{subsubsec:mylabel62}
+
+\begin{procedure}{ReRaise}
+\Declaration
+procedure ReRaise;
+\Notes 
+REGISTERS NOT SAVED??????????? 
+\end{procedure}
+
+\subsubsection{FPC{\_}POPOBJECTSTACK}
+\label{subsubsec:mylabel63}
+
+\begin{function}{PopObjectStack}
+\Declaration
+function PopObjectStack : TObject;
+\Description 
+This is called by the code generator when an exception occurs, it is used to
+retrieve the exception handler object from the context information.
+\Notes 
+REGISTERS NOT SAVED??????????? 
+\end{function}
+
+\subsubsection{FPC{\_}POPSECONDOBJECTSTACK}
+\label{subsubsec:mylabel64}
+
+\begin{function}{PopSecondObjectStack}
+\Declaration
+function PopSecondObjectStack : TObject;
+\Description 
+This is called by the code generator when a double exception occurs, it is
+used to retrieve the second exception handler object from the context
+information.
+\Notes 
+REGISTERS NOT SAVED??????????? 
+\end{function}
+
+\subsubsection{FPC{\_}DESTROYEXCEPTION}
+\label{subsubsec:mylabel65}
+
+\begin{procedure}{DestroyException}
+\Declaration
+Procedure DestroyException(o : TObject);
+\Description 
+This routine is called by the code generator after the exception handling
+code is complete to destroy the exception object.
+\Parameters  
+o = Exception handler object reference 
+\Notes 
+REGISTERS NOT SAVED????????????? 
+\end{procedure}
+
+\subsubsection{FPC{\_}POPADDRSTACK}
+\label{subsubsec:mylabel66}
+
+\begin{procedure}{PopAddrStack}
+\Declaration
+procedure PopAddrStack;
+\Description 
+Called by the code generator in the finally part of a try statement to
+restore the stackframe and dispose of all the saved context information.
+\Notes 
+REGISTERS NOT SAVED?????????? 
+\end{procedure}
+
+\subsubsection{FPC{\_}CATCHES}
+\label{subsubsec:mylabel67}
+
+\begin{function}{Catches}
+\Declaration
+function Catches(Objtype : TExceptObjectClass) : TObject;
+\Description 
+This routine is called by the code generator to get the exception handler
+object. ?????????????????
+\Parameters 
+ObjType = The exception type class 
+\Notes 
+REGISTERS NOT SAVED?????????? 
+\end{function}
+
+\subsubsection{FPC{\_}GETRESOURCESTRING}
+\label{subsubsec:mylabel68}
+
+\begin{function}{GetResourceString}
+\Declaration
+function GetResourceString(Const TheTable: TResourceStringTable;Index : longint) : AnsiString;
+\Description 
+Called by code generator when a reference to a resource string is made. This
+routine loads the correct string from the resource string section and
+returns the found string (or `' if not found).
+\Parameters 
+TheTable = pointer to the resource string table \par
+Index = Index in the resource string table. 
+\end{function}
+
+\subsection{Runtime type information}
+\label{subsec:runtime}
+
+\subsubsection{FPC{\_}DO{\_}IS}
+\label{subsubsec:mylabel69}
+
+\begin{functionl}{Int{\_}Do{\_}Is}{intdois}
+\Declaration
+Function Int{\_}Do{\_}Is(AClass : TClass;AObject : TObject) : Boolean;
+\Description 
+If \textsf{aclass} is of type \textsf{aobject}, returns TRUE otherwise
+returns FALSE.
+\Parameters 
+aclass = class type reference \par
+aobject = Object instance to compare against 
+\Notes 
+This is called by the code generator when the \textsf{is} operator is used. 
+\Algorithm 
+\end{functionl}
+
+\subsubsection{FPC{\_}DO{\_}AS}
+\label{subsubsec:mylabel70}
+
+\begin{procedurel}{Int{\_}Do{\_}As}{intdoas}
+\Declaration
+Procedure Int{\_}Do{\_}As(AClass : TClass;AObject : TObject)
+\Description 
+Typecasts \textsf{aclass} as \textsf{aobject}, with dynamic type checking.
+If the object is not from the correct type class, a runtime error 219 is
+generated. Called by the code generator for the \textsf{as} statement.
+\Parameters 
+aclass = Class to typecast to \par 
+aobject = Object to typecast 
+\end{procedurel}
+
+\subsubsection{FPC{\_}INITIALIZE }
+\label{subsubsec:mylabel71}
+
+\begin{procedure}{Initialize}
+\Declaration
+Procedure Initialize (Data,TypeInfo : Pointer);
+\Description 
+\Parameters
+data = pointer to the data to initialize \par
+typeinfo = pointer to the type information for this data 
+\Notes 
+This routine should save / restore all used registers. 
+\Algorithm 
+Initializes the class data for runtime typed values 
+\end{procedure}
+
+\subsubsection{FPC{\_}FINALIZE}
+\label{subsubsec:mylabel72}
+
+\begin{procedure}{Finalize}
+\Declaration
+procedure Finalize (Data,TypeInfo: Pointer);
+\Description 
+Called by code generator if and only if the reference to finalize <> nil.
+\Parameters 
+data = point to the data to finalize \par 
+typeinfo = Pointer to the type information of this data 
+\Notes 
+This routine should save / restore all used registers. Finalizes and frees
+the heap class data for runtime typed values (decrements the reference
+count)
+\end{procedure}
+
+\subsubsection{FPC{\_}ADDREF}
+\label{subsubsec:mylabel73}
+
+\begin{procedure}{AddRef}
+\Declaration
+Procedure AddRef (Data,TypeInfo : Pointer);
+\Description 
+Called by the code generator for class parameters (property support) of type
+const or value in parameters, to increment the reference count of ANSI
+strings.
+\Notes 
+This routine should save / restore all used registers. This routine can be
+called recursively with a very deep nesting level, an assembler
+implementation in suggested.
+\end{procedure}
+
+\subsubsection{FPC{\_}DECREF}
+\label{subsubsec:mylabel74}
+
+\begin{procedure}{DecRef}
+\Declaration
+Procedure DecRef (Data, TypeInfo : Pointer);
+\Description 
+Called by the code generator for class parameters (property support) of type
+const or value parameters, to decrement the reference count. of ANSI
+strings.
+\Parameters
+\Notes 
+This routine should save / restore all used registers. This routine can be
+called recursively with a very deep nesting level, an assembler
+implementation in suggested.
+\end{procedure}
+
+\subsection{Memory related}
+\label{subsec:memory}
+
+\clearpage
+\subsubsection{FPC{\_}GETMEM}
+\label{subsubsec:mylabel75}
+
+\begin{procedure}{GetMem}
+\Declaration
+procedure GetMem(Var p:Pointer;Size:Longint);
+\end{procedure}
+
+\subsubsection{FPC{\_}FREEMEM}
+\label{subsubsec:mylabel76}
+
+\begin{procedure}{FreeMem}
+\Declaration
+Procedure FreeMem(Var P:Pointer;Size:Longint);
+\end{procedure}
+
+\subsubsection{FPC{\_}CHECKPOINTER}
+\label{subsubsec:mylabel77}
+
+\begin{function}{CheckPointer}
+\Declaration
+Procedure CheckPointer(p : Pointer);
+\Description 
+Called by the code generator when a pointer is referenced in heap debug
+mode. Verifies that the pointer actually points in the heap area.
+\Parameters 
+p = pointer to check 
+\Notes 
+This routine should save /restore all used registers. 
+\end{function}
+
+\subsubsection{FPC{\_}DO{\_}EXIT}
+\label{subsubsec:mylabel78}
+
+\begin{procedurel}{Do{\_}Exit}{doexit}
+\Declaration
+procedure Do{\_}Exit;
+\Description 
+Called by code generator at the end of the program entry point. 
+\Notes 
+Called to terminate the program 
+\Algorithm
+Call all unit exit handlers. \par
+Finalize all units which have a finalization section \par
+Print runtime error in case of error\par
+Call OS-dependant system{\_}exit routine
+\end{procedurel}
+
+\subsubsection{FPC{\_}ABSTRACTERROR}
+\label{subsubsec:mylabel79}
+
+\begin{function}{AbstractError}
+\Declaration
+procedure AbstractError;
+\Description 
+The code generator allocates a VMT entry equal to this routine address when
+a method of a class is declared as being abstract. This routine simply calls
+the default error handler.
+\Algorithm 
+Throw a Runtime error with error code 211 (Abstract call)
+\end{function}
+
+\subsubsection{FPC{\_}INITIALIZEUNITS}
+\label{subsubsec:mylabel80}
+
+\begin{function}{InitializeUnits}
+\Declaration
+\Description 
+Called by the code generator in the main program, this is only available if
+an \textsf{initialization} section exists in one of the units used by the
+program.
+\end{function}
+
+\subsubsection{FPC{\_}NEW{\_}CLASS (assembler)}
+\label{subsubsec:mylabel81}
+
+\begin{procedurel}{int{\_}new{\_}class}{intnewclass}
+\Description 
+This routine will call the TObject.InitInstance() routine to 
+instantiate a class (Delphi-styled class) and allocate the memory for all 
+fields of the class. 
+
+On entry the self{\_}register should be valid, and should point either to 
+nil, for a non-initialized class, or to the current instance of the class. 
+The first parameter on the top of the stack should be a pointer to the VMT 
+table for this class(????).
+\end{procedurel}
+
+\subsubsection{FPC{\_}HELP{\_}DESTRUCTOR}
+\label{subsubsec:mylabel82}
+
+Could be implemented in ASM directly with register parameter passing.
+
+\begin{procedurel}{Int{\_}Help{\_}Destructor}{inthelpdestructor}
+\Declaration
+Procedure Int{\_}Help{\_}Destructor(Var {\_}Self : Pointer; Vmt : Pointer; Vmt{\_}Pos : Cardinal);
+\Description 
+Frees the memory allocated for the object fields, and if the object had a
+VMT field, sets it to nil.
+\Parameters 
+self = pointer to the object field image in memory \par
+vmt = pointer to the the actual vmt table (used to get the size of the object) \par
+vmt{\_}pos = offset in the object field image to the vmt pointer field 
+\Notes 
+This routine should / save restore all used registers. 
+\Algorithm 
+\begin{lstlisting}{}
+if self = nil then 
+ exit
+set VMT field in object field image ,if present, to nil
+Free the allocated heap memory for the field objects
+set Self = nil
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}HELP{\_}CONSTRUCTOR}
+\label{subsubsec:mylabel83}
+
+Could be implemented in ASM directly with register parameter passing.
+
+\begin{functionl}{Int{\_}Help{\_}Constructor}{inthelpconstructor}
+\Declaration
+function Int{\_}Help{\_}Constructor(Var {\_}self : Pointer; Var VMT : Pointer; Vmt{\_}Pos : Cardinal):Pointer;
+\Description 
+Allocates the memory for an object's field, and fills the object fields with
+zeros. Returns the newly allocated self{\_}pointer
+\Parameters 
+self = pointer to the object field image in memory \par 
+vmt = pointer to the the actual vmt table (used to get the size of the object) \par 
+vmt{\_}pos = offset in the object field image to the vmt pointer field
+\Notes 
+The self{\_}pointer register should be set appropriately by the code
+generator to the allocated memory (self parameter)
+\Algorithm 
+Self = Allocate Memory block for object fields \par
+Fill the object field image with zeros\par
+Set the VMT field in allocated object to VMT pointer
+\end{functionl}
+
+\subsubsection{FPC{\_}HELP{\_}FAIL{\_}CLASS}
+\label{subsubsec:mylabel84}
+
+\begin{functionl}{Help{\_}Fail{\_}Class}{inthelpfileclass}
+\Description 
+Inserted by code generator after constructor call. If the constructor failed
+to allocate the memory for its fields, this routine will be called.
+\end{functionl}
+
+\subsubsection{FPC{\_}HELP{\_}FAIL}
+\label{subsubsec:mylabel85}
+
+\begin{functionl}{Help{\_}Fail}{HelpFail}
+\Description 
+Inserted by code generator after constructor call. If the constructor failed
+to allocate the memory for its fields, this routine will be called.
+\end{functionl}
+
+\subsection{Set handling}
+\label{subsec:mylabel10}
+
+\subsubsection{FPC{\_}SET{\_}COMP{\_}SETS}
+\label{subsubsec:mylabel86}
+
+\begin{functionl}{Do{\_}Comp{\_}Sets}{docompsets}
+\Declaration
+function Do{\_}Comp{\_}Sets(Set1,Set2 : Pointer): Boolean;
+\Description 
+This routine compares if set1 and set2 are exactly equal and returns 1 if
+so, otherwise it returns false.
+\Parameters 
+set1 = Pointer to 32 byte set to compare \par
+set2 = Pointer to 32 byte set to compare
+\Notes 
+Both pointers must point to normal sets. 
+\end{functionl}
+
+\subsubsection{FPC{\_}SET{\_}CONTAINS{\_}SET}
+\label{subsubsec:mylabel87}
+
+\begin{procedurel}{Do{\_}Contains{\_}Sets}{docontainssets}
+\Declaration
+Procedure Do{\_}Contains{\_}Sets(Set1,Set2 : Pointer): Boolean;
+\Description 
+Returns 1 if set2 contains set1 (That is all elements of set2 are in set1). 
+\Parameters 
+set1 = Pointer to 32 byte set to verify \par
+set2 = Pointer to 32 byte set to verify 
+\Notes 
+Both pointers must point to normal sets. 
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}CREATE{\_}ELEMENT}
+\label{subsubsec:mylabel88}
+
+\begin{procedurel}{Do{\_}Create{\_}Element}{docreateelement}
+\Declaration
+procedure Do{\_}Create{\_}Element(p : Pointer; b : Byte);
+\Description 
+Create a new normal set in the area pointed to by \textsf{p} and add the
+element value \textsf{b} in that set.
+\Parameters 
+p = pointer to area where the 32 byte set will be created \par
+b = bit value within that set which must be set 
+\Notes 
+This works on normal sets only. 
+\Algorithm 
+Zero the area pointed to by p \par 
+Set the bit number b to 1
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}SET{\_}RANGE}
+\label{subsubsec:mylabel89}
+
+\begin{procedurel}{Do{\_}Set{\_}Range}{dosetrange}
+\Declaration
+Procedure Do{\_}Set{\_}Range(P : Pointer;l,h : Byte);
+\Description 
+Sets the bit values within the \textsf{l} and \textsf{h }bit ranges in the
+normal set pointed to by \textsf{p}
+\Parameters 
+p = pointer to area where the 32 bytes of the set will be updated \par
+l = low bit number value to set \par
+h = high bit number value to set 
+\Notes 
+This works on normal sets only. 
+\Algorithm 
+Set all bit numbers from l to h in set p
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}SET{\_}BYTE}
+\label{subsubsec:mylabel90}
+
+\begin{procedurel}{Do{\_}Set{\_}Byte}{dosetbyte}
+\Declaration
+procedure Do{\_}Set{\_}Byte(P : Pointer;B : byte);
+\Description 
+Add the element \textsf{b} in the normal set pointed to by \textsf{p}
+\Parameters 
+p = pointer to 32 byte set \par 
+b = bit number to set 
+\Notes 
+This works on normal sets only. The intel 80386 version of the compiler does
+not save the used registers, therefore, in that case, it must be done in the
+routine itself.
+\Algorithm 
+Set bit number b in p
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}SUB{\_}SETS}
+\label{subsubsec:mylabel91}
+
+\begin{procedurel}{Do{\_}Sub{\_}Sets}{dosubsets}
+\Declaration
+Procedure Do{\_}Sub{\_}Sets(Set1,Set2,Dest:Pointer);
+\Description
+Calculate the difference between \textsf{set1} and \textsf{set2}, setting
+the result in \textsf{dest}.
+\Parameters 
+set1 = pointer to 32 byte set \par
+set2 = pointer to 32 byte set \par 
+dest = pointer to 32 byte set which will receive the result 
+\Notes 
+This works on normal sets only.  
+\Algorithm 
+\begin{lstlisting}{}
+For each bit in the set do
+ dest bit = set1 bit AND NOT set2 bit
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}MUL{\_}SETS}
+\label{subsubsec:mylabel92}
+
+\begin{procedurel}{Do{\_}Mul{\_}Sets}{domulsets}
+\Declaration
+procedure Do{\_}Mul{\_}Sets(Set1,Set2,Dest:Pointer);
+\Description 
+Calculate the multiplication between \textsf{set1} and \textsf{set2},
+setting the result in \textsf{dest}.
+\Parameters 
+set1 = pointer to 32 byte set \par
+set2 = pointer to 32 byte set \par
+dest = pointer to 32 byte set which will receive the result 
+\Notes 
+This works on normal sets only. 
+\Algorithm 
+\begin{lstlisting}{}
+For each bit in the set do
+ dest bit = set1 bit AND set2 bit
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}SYMDIF{\_}SETS}
+\label{subsubsec:mylabel93}
+
+\begin{procedurel}{Do{\_}Symdif{\_}Sets}{dosymdifssets}
+\Declaration
+Procedure Do{\_}Symdif{\_}Sets(Set1,Set2,Dest:Pointer);
+\Description 
+Calculate the symmetric between \textsf{set1} and \textsf{set2}, setting the
+result in \textsf{dest}.
+\Parameters 
+set1 = pointer to 32 byte set \par
+set2 = pointer to 32 byte set \par
+dest = pointer to 32 byte set which will receive the result 
+\Notes 
+This works on normal sets only. 
+\Algorithm 
+\begin{lstlisting}{}
+For each bit in the set do 
+ dest bit = set1 bit XOR set2 bit
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}ADD{\_}SETS}
+\label{subsubsec:mylabel94}
+
+\begin{procedurel}{Do{\_}Add{\_}Sets}{doaddsets}
+\Declaration
+procedure Do{\_}Add{\_}Sets(Set1,Set2,Dest : Pointer);
+\Description 
+Calculate the addition between \textsf{set1} and \textsf{set2}, setting the
+result in \textsf{dest}.
+\Parameters 
+set1 = pointer to 32 byte set \par
+set2 = pointer to 32 byte set \par 
+dest = pointer to 32 byte set which will receive the result 
+\Notes 
+This works on normal sets only. 
+\Algorithm 
+\begin{lstlisting}{}
+For each bit in the set do
+ dest bit = set1 bit OR set2 bit
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}LOAD{\_}SMALL}
+\label{subsubsec:mylabel95}
+
+\begin{procedurel}{Do{\_}Load{\_}Small}{doloadsmall}
+\Declaration
+Procedure Do{\_}Load{\_}Small(P : Pointer;L:Longint);
+\Description 
+Load a small set into a 32-byte normal set. 
+\Parameters 
+p = pointer to 32 byte set \par 
+l = value of the small set 
+\Notes 
+Called by code generator (type conversion) from small set to large set.
+Apart from the first 32 bits of the 32 byte set, other bits are not
+modified.
+\Algorithm 
+\begin{lstlisting}{}
+For n = bit 0 to bit 31 of l do
+ p bit n = l bit n
+\end{lstlisting}
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}UNSET{\_}BYTE}
+\label{subsubsec:mylabel96}
+
+\begin{procedurel}{Do{\_}Unset{\_}Byte}{dounsetbyte}
+\Declaration
+Procedure Do{\_}Unset{\_}Byte(P : Pointer;B : Byte);
+\Description 
+Called by code generator to exclude element b from a big 32-byte set pointed
+to by p.
+\Parameters 
+p = pointer to 32 byte set \par b = element number to exclude 
+\Notes 
+The intel 80386 version of the compiler does not save the used registers,
+therefore, in that case, it must be done in the routine itself.
+\Algorithm 
+Clear bit number b in p
+\end{procedurel}
+
+\subsubsection{FPC{\_}SET{\_}IN{\_}BYTE}
+\label{subsubsec:mylabel97}
+
+\begin{functionl}{Do{\_}In{\_}Byte}{doinbyte}
+\Declaration
+Function Do{\_}In{\_}Byte(P : Pointer;B : Byte):boolean;
+\Description 
+Called by code generator to verify the existence of an element in a set.
+Returns TRUE if b is in the set pointed to by p, otherwise returns FALSE.
+\Parameters 
+p = pointer to 32 byte set \par b = element number to verify 
+\Notes 
+This routine should save / restore all used registers. 
+\Algorithm
+Clear bit number b in p
+\end{functionl}
+
+\subsection{Optional internal routines}
+\label{subsec:optional}
+
+These routines are dependant on the target architecture. They are present in 
+software if the hardware does not support these features.
+
+They could be implemented in assembler directly with register parameter 
+passing.
+
+\subsubsection{FPC{\_}MUL{\_}INT64}
+\label{subsubsec:mylabel98}
+
+\begin{function}{MulInt64}
+\Declaration
+function MulInt64(f1,f2 : Int64;CheckOverflow : LongBool) : Int64;
+\Description 
+Called by the code generator to multiply two int64 values, when the hardware
+does not support this type of operation. The value returned is the result of
+the multiplication.
+\Parameters 
+f1 = first operand \par
+f2 = second operand \par
+checkoverflow = TRUE if overflow checking should be done 
+\end{function}
+
+\subsubsection{FPC{\_}DIV{\_}INT64}
+\label{subsubsec:mylabel99}
+
+\begin{function}{DivInt64}
+\Declaration
+function DivInt64(n,z : Int64) : Int64;
+\Description 
+Called by the code generator to get the division two int64 values, when the
+hardware does not support this type of operation. The value returned is the
+result of the division.
+\Parameters 
+n =numerator \par
+z = denominator 
+\end{function}
+
+\subsubsection{FPC{\_}MOD{\_}INT64}
+\label{subsubsec:mylabel100}
+
+\begin{function}{ModInt64}
+\Declaration
+function ModInt64(n,z : Int64) : Int64;
+\Description 
+Called by the code generator to get the modulo two int64 values, when the
+architecture does not support this type of operation. The value returned is
+the result of the modulo.
+\Parameters 
+n = numerator \par 
+z = denominator 
+\end{function}
+
+\subsubsection{FPC{\_}SHL{\_}INT64}
+\label{subsubsec:mylabel101}
+
+\begin{function}{ShlInt64}
+\Declaration
+Function ShlInt64(Cnt : Longint; Low, High: Longint): Int64;
+\Description 
+Called by the code generator to shift left a 64-bit integer by the specified
+amount cnt, when this is not directly supported by the hardware. Returns the
+shifted value.
+\Parameters 
+low,high = value to shift (low / high 32-bit value) \par
+cnt = shift count 
+\end{function}
+
+\subsubsection{FPC{\_}SHR{\_}INT64}
+\label{subsubsec:mylabel102}
+
+\begin{function}{ShrInt64}
+\Declaration
+function ShrInt64(Cnt : Longint; Low, High: Longint): Int64;
+\Description 
+Called by the code generator to shift left a 64-bit integer by the specified
+amount cnt, when this is not directly supported by the hardware. Returns the
+shifted value.
+\Parameters 
+low,high = value to shift (low/high 32-bit values) \par
+cnt = shift count 
+\end{function}
+
+\subsubsection{FPC{\_}MUL{\_}LONGINT}
+\label{subsubsec:mylabel103}
+
+\begin{function}{MulLong}
+\Declaration
+Function MulLong: Longint;
+\Description 
+Called by the code generator to multiply two longint values, when the hardware does not support this type of operation. The value returned is the result of the multiplication. 
+\Parameters 
+Parameters are passed in registers. 
+\Notes 
+This routine should save / restore all used registers. 
+\end{function}
+
+\subsubsection{FPC{\_}REM{\_}LONGINT}
+\label{subsubsec:mylabel104}
+
+\begin{function}{RemLong}
+\Declaration
+Function RemLong: Longint;
+\Description 
+Called by the code generator to get the modulo two longint values, when the
+hardware does not support this type of operation. The value returned is the
+result of the modulo.
+\Parameters 
+Parameters are passed in registers. 
+\Notes 
+This routine should save / restore all used registers. 
+\end{function}
+
+\subsubsection{FPC{\_}DIV{\_}LONGINT}
+\label{subsubsec:mylabel105}
+
+\begin{function}{DivLong}
+\Declaration
+Function DivLong: Longint;
+\Description 
+Called by the code generator to get the division two longint values, when
+the hardware does not support this type of operation. The value returned is
+the result of the division.
+\Parameters 
+Parameters are passed in registers. 
+\Notes 
+This routine should save / restore all used registers. 
+\end{function}
+
+\subsubsection{FPC{\_}MUL{\_}LONGINT}
+\label{subsubsec:mylabel106}
+
+\begin{function}{MulCardinal}
+\Declaration
+Function MulCardinal: Cardinal;
+\Description
+Called by the code generator to multiply two cardinal values, when the
+hardware does not support this type of operation. The value returned is the
+result of the multiplication. 
+\Parameters
+Parameters are passed in registers. 
+\Notes
+This routine should save / restore all used registers. 
+\end{function}
+
+\subsubsection{FPC{\_}REM{\_}CARDINAL}
+\label{subsubsec:mylabel107}
+
+\begin{function}{RemCardinal}
+\Declaration
+Function RemCardinal : Cardinal;
+\Description
+Called by the code generator to get the modulo two cardinal values, when the
+hardware does not support this type of operation. The value returned is the
+result of the modulo.
+\Parameters
+Parameters are passed in registers. 
+\Notes 
+This routine should save / restore all used registers. 
+\end{function}
+
+\subsubsection{FPC{\_}DIV{\_}CARDINAL}
+\label{subsubsec:mylabel108}
+
+\begin{function}{DivCardinal}
+\Declaration
+Function DivCardinal: Cardinal;
+\Description
+Called by the code generator to get the division two cardinal values, when
+the hardware does not support this type of operation. The value returned is
+the result of the division. 
+\Parameters
+Parameters are passed in registers. 
+\Notes
+This routine should save / restore all used registers. 
+\end{function}
+
+\subsubsection{FPC{\_}LONG{\_}TO{\_}SINGLE}
+\label{subsubsec:mylabel109}
+
+\begin{function}{LongSingle}
+\Declaration
+Function LongSingle: Single;
+\Description
+Called by the code generator to convert a longint to a single IEEE floating
+point value.
+\Parameters
+Parameters are passed in registers 
+\Notes 
+This routine should save / restore all used registers. 
+\end{function}
+
+FPC{\_}ADD{\_}SINGLE
+
+FPC{\_}SUB{\_}SINGLE
+
+FPC{\_}MUL{\_}SINGLE
+
+FPC{\_}REM{\_}SINGLE
+
+FPC{\_}DIV{\_}SINGLE
+
+FPC{\_}CMP{\_}SINGLE
+
+FPC{\_}SINGLE{\_}TO{\_}LONGINT
+
+\section{Optimizing your code}
+\label{sec:optimizing}
+
+\subsection{Simple types}
+\label{subsec:simple}
+
+Use the most simple types, when defining and declaring variables, they 
+require less overhead. Classes, and complex string types (ansi strings and 
+wide strings) posess runtime type information, as well as more overhead for 
+operating on them then simple types such as shortstring and simple ordinal 
+types.
+
+\subsection{constant duplicate merging}
+\label{subsec:constant}
+
+When duplicates of constant strings, sets or floating point values are found 
+in the code, they are replaced by only once instance of the same string, set 
+or floating point constant which reduces the size of the final executable.
+
+\subsection{inline routines}
+\label{subsec:inline}
+
+The following routines of the system unit are directly inlined by the 
+compiler, and generate more efficient code:
+
+\begin{longtable}{|l|p{7cm}|}
+\hline
+Prototype& Definition and notes \\
+\hline
+\endhead
+\hline
+\endfoot
+\textsf{function pi : extended;}& \\
+\textsf{function abs(d : extended) : extended;}& \\
+\textsf{function sqr(d : extended) : extended;}& \\
+\textsf{function sqrt(d : extended) : extended;}& \\
+\textsf{function arctan(d : extended) : extended;}& \\
+\textsf{function ln(d : extended) : extended;}& \\
+\textsf{function sin(d : extended) : extended;}& \\
+\textsf{function cos(d : extended) : extended;}& \\
+\textsf{function ord(X): longint;}& 
+   Changes node type to be type compatible \\
+\textsf{function lo(X) : byte or word;}& 
+   Generates 2-3 instruction sequence inline \\
+\textsf{function hi(X) : byte or word;}& 
+   Generates 2-3 instruction sequence inline \\
+\textsf{function chr(b : byte) : Char;}& 
+   Changes node type to be type compatible \\
+\textsf{function Length(s : string) : byte;}& 
+   Generate 2-3 instruction sequence \\
+\textsf{function Length(c : char) : byte;}& 
+   Generates 1 instruction sequence (appx.) \\
+\textsf{procedure Reset(var f : TypedFile);}& 
+   Calls FPC{\_}RESET{\_}TYPED \\
+\textsf{procedure rewrite(var f : TypedFile);}& 
+   Calls FPC{\_}REWRITE{\_}TYPED \\
+\textsf{procedure settextbuf(var F : Text; var Buf);}& 
+   Calls SetTextBuf of runtime library \\
+\textsf{procedure writen;}& 
+   Calls FPC{\_}WRITE{\_}XXXX routines \\
+\textsf{procedure writeln;}& 
+   Calls FPC{\_}WRITE{\_}XXXX routines \\
+\textsf{procedure read;}& 
+   Calls FPC{\_}READ{\_}XXXX routines \\
+\textsf{procedure readln;}& 
+   Calls FPC{\_}READ{\_}XXXX routines \\
+\textsf{procedure concat;}& 
+   Generates a TREE NODES of type addn \\
+\textsf{function assigned(var p): boolean;}& 
+   Generates 1-2 instruction sequence inline \\
+\textsf{procedure str(X :[Width [:Decimals]]; var S);}& \\
+\textsf{}&  \\
+\textsf{function sizeof(X): longint;}& 
+   Generates 2-3 instruction sequence inline \\
+\textsf{function typeof(X): pointer;}& 
+   Generates 2-3 instruction sequence inline \\
+\textsf{procedure val(S;var V; var Code: integer);}& \\
+\textsf{function seg(X): longint;}& \\
+\textsf{function High(X)}& 
+   Generates a TREE NODE of type ordconstn \\
+\textsf{function Low(X)}& 
+   Generates a TREE NODE of type ordconstn \\
+\textsf{function pred(x)}& 
+   Generates 2-3 instruction sequence inline \\
+\textsf{function succ(X)}& 
+   Generates 2-3 instruction sequence inline \\
+\textsf{procedure inc(var X [ ; N: longint]);}& 
+   Generate 2-3 instruction sequence inline \\
+\textsf{procedure dec(var X [; N:longint]);}& 
+   Generate 2-3 instruction sequence inline \\
+\textsf{procedure include(var s: set of T; I: T);}& 
+   In the case of a small set : Generates 2-3 instruction sequence inline,
+   otherwise calls FPC{\_}SET{\_}SET{\_}BYTE \\
+\textsf{procedure exclude(var S : set of T; I: T);}& 
+   In the case of a small set : Generates 2-3 instruction sequence inline,
+   otherwise calls FPC{\_}SET{\_}UNSET{\_}BYTE \\
+\textsf{procedure assert(expr : Boolean [; const msg: string]);}& 
+  Calls the internal routine FPC{\_}ASSERT in the case where the assert fails.\\
+\textsf{function addr(X): pointer;}& 
+  Generates a TREE NODE of type addrn \\
+\textsf{function typeInfo(typeIdent): pointer;}& 
+  Generates 1 instruction sequence inline \\
+\end{longtable}
+
+\subsection{temporary memory allocation reuse}
+\label{subsec:mylabel11}
+
+When routines are very complex , they may require temporary allocated space 
+on the stack to store intermediate results. The temporary memory space can 
+be reused for several different operations if other space is required on the 
+stack. 
+
+\section{Appendix A}
+\label{sec:appendix}
+
+This appendix describes the temporary defines when compiling software under 
+the compiler:
+
+The following defines are defined in FreePascal for v1.0.x, but they will be 
+removed in future versions, they are used for debugging purposes only:
+
+\begin{itemize}
+\item INT64
+\item HASRESOURCESTRINGS
+\item NEWVMTOFFSET 
+\item HASINTERNMATH 
+\item SYSTEMVARREC 
+\item INCLUDEOK 
+\item NEWMM
+\item HASWIDECHAR
+\item INT64FUNCRESOK 
+\item CORRECTFLDCW 
+\item ENHANCEDRAISE 
+\item PACKENUMFIXED
+\end{itemize}
+
+NOTE: Currently, the only possible stack alignment are either 2 or 4 if the
+target operating system pushes parameters on the stack directly in assembler
+(because for example if pushing a long value on the stack while the required
+stack alignment is 8 will give out wrong access to data in the actual
+routine -- the offset will be wrong).
+
+\printindex
+\end{document}