File: precompile.t2

For general comments see here
LineAddressObject Code LabelF1N1BF2N2CommentsCheck
1 0  ; tape1.d/precompile.t2
2 0  ;----------------------
3 0  ;
4 0  =4392 
5 4392 0606245435755precom:'PRECOM'; @4392
6 4393  ; compile PROCOMPILE statement
7 4393  ; i.e. dump all info out for re-input later
8 4393  ;
9 4393  Precompile::; 
10 4393  Precompile:; 
11 4393 0601425 lod errsw   ;code produced
12 4393+1150454 jz _err53   ;no, issue error message
13 4394   call     ; @4394
13+14394 7322411004503 lnk advance.lnk:jmp advance.ent 
14 4395 0600600 lod token   ;
15 4395+0122200 sub K8a   ;=8, [']
16 4396 1150455 jz .ok   ;syntax checks complete @4396
17 4396+ _err53:; 
18 4396+1661044 lnk errlnk   ;error 53: precompile not followed by ; or
19 4397   ; precompile in program compiled to tape 
20 4397 1001070 jmp Error   ;call error routine
21 4397+ ;
22 4397+ .ok:; 
23 4397+0601437 lod W799   ; film switch
24 4398 1050457 jz .ok1   ; to core @4398
25 4398+1110454 jmp _err53   ; to film, not supported
26 4399  ;
27 4399  .ok1:; 
28 4399 0600021 lod EP17   ;
29 4399+0400016 sto EP14   ;
30 4400 1010425 jmp Ep19   ; @4400
31 4400+ ;
32 4400+0000000 o00 0    
33 4401  ;--------------------------------------------------------------------
34 4401  Ep19P:; 
35 4401 0602222.4401:lod K8191   ; @4401
36 4401+0460016 ans EP14   ;
37 4402 0600021 lod EP17   ; @4402
38 4402+0062222 and K8191   ;
39 4403 0120016 sub EP14   ;
40 4403+1050465 jz .4405   ;
41 4404  L4404:; 
42 4404  .4404:; 
43 4404 1661044_err52:lnk errlnk   ;error 52: issue mismatch @4404
44 4404+1001070 jmp Error   ;call error
45 4405  ;
46 4405  .4405:; 
47 4405 0600020 lod EP16   ;
48 4405+0120015 sub EP13   ;
49 4406  W4406:; 
50 4406 1057767.4406:jz L8183   ; @4406
51 4406+1010464 jmp L4404   ;error
52 4407  ;--------------------------------------------------------------------
53 4407  ; entry via 40 18,
54 4407  ; continue compilation after precompile
55 4407  ;
56 4407  Ep18:; 
57 4407  .4407:; 
58 4407 0602160 lod dicpt   ; @4407
59 4407+0122151 sub stkp   ;
60 4408 0124366 sub W2294   ; @4408
61 4408+1030515 jn .4429   ;
62 4409  .4409:; 
63 4409 0602151 lod stkp   ;
64 4409+0247521 exc titleend   ;
65 4410 0167515 bus titleptr   ; @4410
66 4410+0420004 stn 4   ;
67 4411 3210646417777 lis stkp/stn -1;
68 4412 1010475 jmp .4413   ; @4412
69 4412+ ;
70 4412+ .4412P:; 
71 4412+0442151 inc stkp   ;
72 4413  .4413:; 
73 4413 2236526577777 inc stkbase/lod -1;
74 4414 0010646400000 o00 stkp/sto 0; @4414
75 4415 0640004 lis 4   ;
76 4415+1130474 jn .4412P   ;
77 4416 0010646600000 o00 stkp/lod 0; @4416
78 4417   nop     ;
78+14417 1110501 jmp .1    
78+24417+ .1:; 
79 4417+1200044 sra 36   ;
80 4418 0547522 cls eotflg   ; @4418
81 4418+0602151 lod stkp   ;
82 4419  W4419:; 
83 4419 0407515.4419:sto titleptr   ;
84 4419+0010466 o00 W4406   ;
85 4420   call     ; @4420
85+14420 7336515107417 lnk L3855P.lnk:jmp L3855P.ent 
86 4421 0607515 lod titleptr   ;
87 4421+0402151 sto stkp   ;
88 4422  .4422:; 
89 4422 0041421 o02 W785   ; @4422
90 4422+0127525 sub stkbase   ;
91 4423 1030510 jn .4424   ;
92 4423+1010520 jmp .4432   ;
93 4424  ;
94 4424 0040000.4424:o02 0   ;=1 @4424
95 4424+0567525 o27 stkbase   ;
96 4425 2710646600000 o27 stkp/lod 0;
97 4426 0036526400000 o00 stkbase/sto 0; @4426
98 4427 1030514 jn .4428   ;
99 4427+1010506 jmp .4422   ;
100 4428  ;
101 4428  .4428:; 
102 4428 0447525 inc stkbase   ; @4428
103 4428+1003342 jmp L1762   ;
104 4429  ;
105 4429  .4429:; 
106 4429   call     ;
106+14429 7306145002056 lnk L1070.lnk:jmp L1070.ent 
107 4430 1010471 jmp .4409   ; @4430
108 4430+ ;
109 4430+ .4430P:; 
110 4430+0610503 lod W4419   ;
111 4431 0347523 stc Link33   ;
112 4431+1107714 jmp pause.ent   ;
113 4432  ;
114 4432  .4432:; 
115 4432   call     ; @4432
115+14432 7306145002005 lnk L1029.lnk:jmp L1029.ent 
116 4433 1010510 jmp .4424   ;
117 4433+ ;
118 4433+ L4433P:; 
119 4433+0610655.4433P:lod getchar.ipnorm   ;=
120 4434 0340604 stc getchar.ent   ;reset getchar @4434
121 4434+0601501 lod putcode.pat+1   ;=<44 ;+1 : 30 780>
122 4435 0341500 stc putcode.pat   ; set gate open
123 4435+1110516 jmp .4430P   ;
124 4436  ;--------------------------------------------------------------------
125 4436  ; entry via 44 18, to check a precompiled program
126 4436  ;
127 4436  Ep18P:; 
128 4436 0610414.4436:lod W4364   ; @4436
129 4436+0417562 sto DumpSys.trigger   ;
130 4437   call     ;
130+14437 7377571017577 lnk L8063.lnk:jmp L8063.ent 
131 4438 0610412 lod W4362   ; @4438
132 4438+0417562 sto DumpSys.trigger   ;
133 4439   call     ;
133+14439 7377571017627 lnk L8087.lnk:jmp L8087.ent 
134 4440 1010530.4440:jmp .4440   ; dynamic halt @4440
135 4440+ ;
136 4440+  pad      
136+14440+0000000 00 0    
137 4441  =4460 
138 4460  ;
139 4460 0000000000114K76:+76; @4460
140 4461 0000000000777W4461:+511; @4461
141 4462 0000000001400W4462:+768; @4462
142 4463 2712107017004K1EN78:+02712107017004;flpt 1E-78 @4463
143 4464  ;
144 4464  ;--------------------------------------------------------------------
145 4464  ; code to dump compiler state (precompile)
146 4464  =4362 
147 4362 0400001110521W4362:add 0:jmp L4433P;@4362
148 4363  ; list of regions for precompile dump
149 4363  PreList:; 
150 4363 4000064000016W4363:40 EP13:00 EP14;entry points ;@4363
151 4364 0400001100023W4364:04 0:40 EP19#;ditto ;@4364
152 4365 2010610002161 20 Link15d:00 wsptr;data in data.t2 ;@4365
153 4366 2016134003430 20 idptr:00 W1816;data in lookupid.t2 ;@4366
154 4367 2002760000601 20 currchar:00 token+1;data in packword.t2 ;@4367
155 4368 2006060001430 20 PCdata:00 W792;data in data.t2 (putcode);@4368
156 4369 2007070001617 20 W910:00 W911;data in putcode.t2 ;@4369
157 4370 2021400004311 20 W2240:00 W2249;data in data.t2 ;@4370
158 4371 2036464007525 20 titleptr:00 stkbase;data in data.t2 ;@4371
159 4372 6034160007041 60 Link32:00 W3617;data in data.t2 ;@4372
160 4373  ;-------------------------------------------------------------
161 4373  ; entry via location 19 comes here
162 4373  Ep19:; 
163 4373 0600020.4373:lod EP16   ; ;@4373
164 4373+0400015 sto EP13   ;
165 4374 0541476 cls putcode.lnk   ; @4374
166 4374+0610413 lod PreList+0   ;
167 4375  .4375:; 
168 4375   call     ;
168+14375 7377571017700 lnk BinPut.lnk:jmp BinPut.ent 
169 4376 2206372610413 inc putcode.lnk/lod PreList;get next region@4376
170 4377 1030432 jn .4378   ;last in list, skip
171 4377+1010427 jmp .4375   ;back to output it
172 4378  ;
173 4378  .4378:; 
174 4378 0062177 and MaxInt   ; @4378
175 4378+  pad     ;
175+14378+0000000 00 0    
176 4379   call     ;
176+14379 7377571017700 lnk BinPut.lnk:jmp BinPut.ent 
177 4380 0607532 lod FreeMemPtr   ; @4380
178 4380+1320024 sll 20   ;
179 4381 0101421 add W785   ;
180 4381+0102232 add procbit   ;
181 4382   call     ; @4382
181+14382 7377571017700 lnk BinPut.lnk:jmp BinPut.ent 
182 4383 0607525 lod stkbase   ;
183 4383+1320024 sll 20   ;
184 4384 0102151 add stkp   ; @4384
185 4384+0102232 add procbit   ;
186 4385   call     ;
186+14385 7377571017700 lnk BinPut.lnk:jmp BinPut.ent 
187 4386 0602160 lod dicpt   ; @4386
188 4386+1320024 sll 20   ;
189 4387 0100013 add Memtop   ;
190 4387+0102232 add procbit   ;
191 4388   call     ; @4388
191+14388 7377571017700 lnk BinPut.lnk:jmp BinPut.ent 
192 4389 0610412 lod W4362   ;
193 4389+  pad     ;
193+14389+0000000 00 0    
194 4390   call     ; @4390
194+14390 7377571017700 lnk BinPut.lnk:jmp BinPut.ent 
195 4391 1010447.4391:jmp .4391   ; loop-stop
196 4391+ ;
197 4391+  pad     ;
197+14391+0000000 00 0    
198 4392  =4584+ 
199 4584+ ;--------------------------------------------------------------------
200 4584+  ;