|
|
DataMuseum.dkPresents historical artifacts from the history of: Bogika Butler |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Bogika Butler Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 24576 (0x6000)
Types: TextFile
Names: »LNKDF1X.PRN«
└─⟦91467e717⟧ Bits:30009789/_.ft.Ibm2.50007348.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »LNKDF1X.PRN«
Pro Pascal Compiler - Version zz 2.1
Compilation of: B:LNKDF1X.PAS
Options: LNIAG
1 0000 SEGMENT LnkDF1X;
2 0000
3 0000 (* Segment LnkDF1X defines the test output primitives used for debugging
4 0000 program link and its associated subroutines and functions. The
5 0000 corresponding external declarations should be found in file
6 0000 'LnkDC1.pas'.
7 0000 *)
8 0000
9 0000 (*$I B:lnkDC0.pas Declarations of global constants, types, and commons *)
10 0000 (******************************************************************************)
11 0000 (* *)
12 0000 (* Copyright (1985) by Metanic Aps., Denmark *)
13 0000 (* *)
14 0000 (* Author: Lars Gregers Jakobsen. *)
15 0000 (* *)
16 0000 (******************************************************************************)
17 0000
18 0000 CONST (*LINK*)
19 0000 FileNameLength = 14;
20 0000 MaxSymbolNameIndex = 2; (*?*)
21 0000 MaxNooInputFiles = 2; (*?*)
22 0000 MaxNooModules = 2; (*?*)
23 0000 MaxNooSections = 2; (*?*)
24 0000 MaxNooSegments = 3; (*?*)
25 0000 MaxNooSymbols = 5; (*?*)
26 0000 MaxNooExternalImportSymbols = 2; (*?*)
27 0000 MaxNooInternalImportSymbols = 2; (*?*)
28 0000 MaxObjectRecordIndex = 31; (*?*)
29 0000 MaxSectorIndex = 1023;
30 0000 MaxNameTableIndex = 9; (*?*)
31 0000 OM_Format1 = 1;
32 0000 OF_Format1 = 1;
33 0000 LogFilePageSize = 65; (*First line is #1. Last line is #65*)
34 0000
35 0000 (*$I A:PrTstCon.pas Declarations of constants for PrTst package *)
36 0000 (* $I A:PrTstCon.pas Declarations of constants for PrTst package *)
37 0000
38 0000 (* This file is part of the ProPascal test option package. Se file
39 0000 PrTst.pas for further explanations of usage
40 0000 *)
41 0000
42 0000 max_test_option_number = 31;
43 0000
44 0000
45 0000
46 0000
47 0000 TYPE (*LINK*)
48 0000
49 0000 (* General Types *)
50 0000
51 0000 i8 = 0..255;
52 0000 byte = i8;
53 0000 i16 = 0..65535;
54 0000 i32 = integer;
55 0000 i32IndexType = (bs0, bs1, bs2, bs3);
56 0000 i32ArrayType = ARRAY (.i32IndexType.) OF i8;
57 0000 CharSetType = SET OF char;
58 0000
59 0000 (* Basic Types *)
60 0000
61 0000 StatusType = (success
62 0000 ,error
63 0000 ,badfileformat
64 0000 ,badmoduleformat
65 0000 ,unexpectedeof
66 0000 ,NotFound
67 0000 ,DuplicateModuleName
68 0000 ,NameTableOverFlow
69 0000 ,ModuleTableOverFlow
70 0000 ,SectionTableOverFlow
71 0000 ,FileNameTableOverFlow
72 0000 ,SymbolTableOverFlow
73 0000 ,ExternalImportTableOverFlow
74 0000 ,InternalImportTableOverFlow
75 0000 ,ValueTableOverFlow
76 0000 ,NoSuchFile
77 0000 ,NotFinished
78 0000 ,BadLogFileName
79 0000 ,BadTargetFileName
80 0000 ,BadSymbolName
81 0000 ,NoInputFiles
82 0000 ,BadOption
83 0000 ,BadFileName
84 0000 ,AmbiguousName
85 0000 ,DuplicateExportSymbol
86 0000 ,HeapEmpty
87 0000 ,NotUsed
88 0000 );
89 0000
90 0000 OF_FormatType = i32;
91 0000 OM_FormatType = i32;
92 0000 FileKindBaseType = (explicit, implicit, none);
93 0000 LogFileKindType = explicit..none;
94 0000 TargetFileKindType = explicit..implicit;
95 0000
96 0000 SegmentNoType = 0..MaxNooSegments;
97 0000 RelocationIndicatorType = SegmentNoType;
98 0000 FileAddressType = 0..MaxInt;
99 0000 SizeType = FileAddressType;
100 0000
101 0000
102 0000
103 0000 SymbolNameIndexType = 0..MaxSymbolNameIndex;
104 0000 SymbolNameSubIndexType = 1..MaxSymbolNameIndex;
105 0000 SymbolNameType = RECORD
106 0000 Length: SymbolNameIndexType;
107 0000 Name: ARRAY (.SymbolNameSubIndexType.) OF i8;
108 0000 END;
109 0000 ModuleNameType = SymbolNameType;
110 0000 FileNameType = STRING(.FileNameLength.);
111 0000
112 0000 (*
113 0000 SectorIndexType = 0..MaxSectorIndex;
114 0000 SectorType = ARRAY (.SectorIndexType.) OF byte;
115 0000 FileType = RECORD
116 0000 F: File OF SectorType; (* File system file * )
117 0000 S: i32; (* Current sector number * )
118 0000 P: SectorIndexType (* Current index into current sector * )
119 0000 END;
120 0000 *)
121 0000 FileType = RECORD
122 0000 F: FILE OF i8; (* File systeme file *)
123 0000 P: FileAddressType (* Current file address.
124 0000 NOT defined when eof(F) = true *)
125 0000 END;
126 0000
127 0000 PageNoType = i32;
128 0000 LineNoType = 0..255;
129 0000 LogFileType = RECORD
130 0000 F: text; (* File system file *)
131 0000 P: PageNoType; (* No of page started upon *)
132 0000 L: LineNoType; (* No of line just printed within current page *)
133 0000 END;
134 0000
135 0000 (* Table Index Types *)
136 0000
137 0000 ExternalImportTableIndexType = 0..MaxNooExternalImportSymbols;
138 0000 FileNameTableIndexType = -1..MaxNooInputFiles;
139 0000 InternalImportTableIndexType = 0..MaxNooInternalImportSymbols;
140 0000 ModuleTableIndexType = 0..MaxNooModules;
141 0000 NameTableIndexType = 0..MaxNameTableIndex;
142 0000 SectionTableIndexType = 0..MaxNooSections;
143 0000 SymbolTableIndexType = 0..MaxNooSymbols;
144 0000
145 0000 (* Table Sub Index Types *)
146 0000
147 0000 ExternalImportTableSubIndexType = 1..MaxNooExternalImportSymbols;
148 0000 InternalImportTableSubIndexType = 1..MaxNooInternalImportSymbols;
149 0000 ModuleTableSubIndexType = 1..MaxNooModules;
150 0000 NameTableSubIndexType = 1..MaxNameTableIndex;
151 0000 SectionTableSubIndexType = 1..MaxNooSections;
152 0000 SymbolTableSubIndexType = 1..MaxNooSymbols;
153 0000
154 0000
155 0000
156 0000 (* Table Record Types *)
157 0000
158 0000 ExternalImportTableRecordType = RECORD
159 0000 SymbolNo: SymbolTableIndexType
160 0000 END;
161 0000
162 0000 FileNameTableRecordType = FileNameType;
163 0000
164 0000 InternalImportTableRecordType = RECORD
165 0000 ModificationAddress: FileAddressType;
166 0000 SymbolIndex: ExternalImportTableIndexType
167 0000 END;
168 0000
169 0000 ModuleTableRecordType = RECORD
170 0000 ModuleNameReference: SymbolTableIndexType; (* Reference to symbol
171 0000 table entry holding
172 0000 module name*)
173 0000 FileNameReference: FileNameTableIndexType; (* *)
174 0000 CurrentFileAddress: FileAddressType; (* Offset relative to
175 0000 start of file *)
176 0000 Referenced: Boolean; (* True if module referenced *)
177 0000 NooSegments: SegmentNoType; (* Noo Segments in module *)
178 0000 NooExternalImportSymbols: ExternalImportTableIndexType;
179 0000 EITOffset: ExternalImportTableIndexType;
180 0000 SBTLinkHead: SymbolTableIndexType
181 0000 END;
182 0000
183 0000 SectionTableRecordType = RECORD
184 0000 ModuleNo: ModuleTableIndexType;
185 0000 SegmentNo: SegmentNoType;
186 0000 ImageSize,
187 0000 RldSize: FileAddressType;
188 0000 NooInternalImportSymbols: InternalImportTableIndexType;
189 0000 RelocationConstant: SizeType;
190 0000 END;
191 0000
192 0000 SymbolTableRecordType = RECORD
193 0000 Section: SectionTableIndexType;
194 0000 NameReference: NameTableIndexType;
195 0000 SortLink: SymbolTableIndexType
196 0000 END;
197 0000
198 0000 ValueTableRecordType = RECORD
199 0000 Resolved: Boolean;
200 0000 Value: i32
201 0000 END;
202 0000
203 0000 (* Table Types *)
204 0000
205 0000
206 0000 ExternalImportTableType = ARRAY (.ExternalImportTableSubIndexType.) OF
207 0000 ExternalImportTableRecordType;
208 0000
209 0000 FileNameTableType = ARRAY (.FileNameTableIndexType.) OF
210 0000 FileNameTableRecordType;
211 0000
212 0000 InternalImportTableType = ARRAY (.InternalImportTableSubIndexType.) OF
213 0000 InternalImportTableRecordType;
214 0000
215 0000 ModuleTableType = ARRAY (.ModuleTableSubIndexType.) OF
216 0000 ModuleTableRecordType;
217 0000
218 0000 OptionTableType = RECORD
219 0000 LogFileKind: LogFileKindType;
220 0000 TargetFileKind: TargetFileKindType
221 0000 END;
222 0000
223 0000 NameTableType = ARRAY (.NameTableSubIndexType.) OF i8;
224 0000
225 0000 SectionTableType = ARRAY (.SectionTableSubIndexType.) OF
226 0000 SectionTableRecordType;
227 0000
228 0000 SymbolTableType = ARRAY (.SymbolTableSubIndexType.) OF
229 0000 SymbolTableRecordType;
230 0000
231 0000 ValueTableType = ARRAY (.SymbolTableSubIndexType.) OF
232 0000 ValueTableRecordType;
233 0000
234 0000
235 0000
236 0000
237 0000 ObjectRecordKindType = (OFF_Kind,
238 0000 OMF_Kind,
239 0000 OMH_Kind,
240 0000 SGD_Kind,
241 0000 EXP_Kind,
242 0000 EXI_Kind,
243 0000 IMG_Kind,
244 0000 RLD_Kind,
245 0000 INI_Kind,
246 0000 SYM_Kind,
247 0000 IndexableKind
248 0000 );
249 0000
250 0000 ObjectRecordIndexType = 0..MaxObjectRecordIndex;
251 0000
252 0000 ObjectRecordType = RECORD
253 0000 CASE ObjectRecordKind: ObjectRecordKindType OF
254 0000 OFF_Kind:
255 0000 (OF_Format: OF_FormatType);
256 0000 OMF_Kind:
257 0000 (OM_Format: OM_FormatType);
258 0000 OMH_Kind:
259 0000 (OMH_Module
260 0000 ,OMH_NooSegments
261 0000 ,OMH_NooExportSymbols
262 0000 ,OMH_NooExtImportSymbols
263 0000 : i32
264 0000 ;OMH_ModuleName
265 0000 : ModuleNameType
266 0000 );
267 0000 SGD_Kind:
268 0000 (SGD_Image
269 0000 ,SGD_Rld
270 0000 ,SGD_IntImport
271 0000 ,SGD_NooIntImportSymbols: i32
272 0000 );
273 0000 EXP_Kind:
274 0000 (EXP_RelocationIndicator: RelocationIndicatorType
275 0000 ;EXP_Item: i32
276 0000 ;EXP_SymbolName: SymbolNameType
277 0000 );
278 0000 EXI_Kind:
279 0000 (EXI_SymbolName: SymbolNameType
280 0000 );
281 0000 IMG_Kind:
282 0000 (IMG_SectionImageUnit: i8
283 0000 );
284 0000 RLD_Kind:
285 0000 (RLD_RelocationIndicator: RelocationIndicatorType
286 0000 );
287 0000 INI_Kind:
288 0000 (INI_ModificationAddress: FileAddressType
289 0000 ;INI_SymbolIndex: ExternalImportTableIndexType
290 0000 );
291 0000 SYM_Kind:
292 0000 (SYM_SymbolName: SymbolNameType
293 0000 );
294 0000 IndexableKind:
295 0000 (N: ARRAY (.ObjectRecordIndexType.) OF i8)
296 0000 END; (*RECORD CASE*)
297 0000
298 0000 (*$I A:PrTstTyp.pas Declarations of types for PrTst package *)
299 0000 (* $I A:PrTstTyp.pas Declarations of types for PrTst package *)
300 0000
301 0000 (* This file is part of the ProPascal test option package. Se file
302 0000 PrTst.pas for further explanations of usage
303 0000 *)
304 0000
305 0000 test_option_type = 0..max_test_option_number;
306 0000 test_option_set_type = SET OF test_option_type;
307 0000
308 0000
309 0000
310 0000
311 0000 COMMON (*LINK*)
312 0000
313 0000 (* Permanent Tables *)
314 0000
315 0000 OptionTable: OptionTableType;
316 0000
317 0000 FileNameTable: FilenameTableType;
318 0000 CurFileNo: FileNameTableIndexType;
319 0000
320 0000 ModuleTable: ModuleTableType;
321 0000 CurModuleNo: ModuleTableIndexType;
322 0000
323 0000 SectionTable: SectionTableType;
324 0000 SCTOffset: SectionTableIndexType;
325 0000 CurSegmentCount: SegmentNoType;
326 0000
327 0000
328 0000 ValueTable: ValueTableType;
329 0000 CurValueNo: SymbolTableIndexType; (*?*)
330 0000
331 0000 ExternalImportTable: ExternalImportTableType;
332 0000 CurExternalImportSymbolNo: ExternalImportTableIndexType;
333 0000
334 0000 (*$I A:PrTstCom.pas Declarations of global variables for PrTst package *)
335 0000 (* $I A:PrTstCom.pas Declarations of global variables for PrTst package *)
336 0000
337 0000 (* This file is part of the ProPascal test option package. Se file
338 0000 PrTst.pas for further explanations of usage
339 0000 *)
340 0000
341 0000 test_options: test_option_set_type;
342 0000 test_out: text;
343 0000 test_global: boolean;
344 0000
345 0000
346 0000
347 0000
348 0000 FUNCTION memavail: integer; EXTERNAL;
349 0000
350 0000 PROCEDURE TSTasc(N: i8
351 0000 );
352 0000
353 0000 BEGIN (*TSTASC*)
354 0000 IF (31 < N) and (N < 127) THEN
355 0024 write(TestOut, chr(N) )
356 003D ELSE
357 0042 write(TestOut, '+')
358 005A END; (*TSTASC*)
359 0063
360 0063 PROCEDURE TSThex(N: i8
361 0063 );
362 0063
363 0063 VAR
364 0063 Nibble: i8;
365 0063
366 0063 BEGIN (*TSTHEX*)
367 0063 Nibble := N div 16;
368 0082 IF Nibble < 10 THEN
369 008B write(TestOut, chr( ord('0') + Nibble ) )
370 00AB ELSE
371 00B0 write(TestOut, chr( ord('A') - 10 + Nibble ) );
372 00D3 Nibble := N mod 16;
373 00E4 IF Nibble < 10 THEN
374 00ED write(TestOut, chr( ord('0') + Nibble ) )
375 010D ELSE
376 0112 write(TestOut, chr( ord('A') - 10 + Nibble ) )
377 0132 END; (*TSTHEX*)
378 013B
379 013B PROCEDURE TSTbool(A: boolean
380 013B );
381 013B
382 013B BEGIN (*TSTBOOL*)
383 013B IF A THEN
384 014E write(TestOut, 'T')
385 0166 ELSE
386 016B write(TestOut, 'F')
387 0183 END; (*TSTBOOL*)
388 018C
389 018C PROCEDURE TSTindt;
390 018C
391 018C BEGIN (*TSTindt*)
392 018C write(TestOut, ' ':3)
393 01AC END; (*TSTindt*)
394 01B5
395 01B5 PROCEDURE TSTln;
396 01B5
397 01B5 BEGIN (*TSTln*)
398 01B5 writeln(TestOut)
399 01CC END; (*TSTln*)
400 01D5
401 01D5 PROCEDURE TSTsymbol(S: SymbolNameType
402 01D5 );
403 01D5
404 01D5 VAR
405 01D5 I: SymbolNameIndexType;
406 01D5
407 01D5 BEGIN (*TSTSYMBOL*)
408 01D5 WITH S DO
409 01F7 BEGIN
410 01FC write(TestOut, 'SYMBOLÆ', Length:1, 'Å=');
411 0242 FOR I := 1 TO Length DO
412 025B TSTasc(Name(.I.));
413 0281 TSTln;
414 0289 END
415 0289 END; (*TSTSYMBOL*)
416 028F
417 028F PROCEDURE TSTstat(Status: StatusType
418 028F );
419 028F
420 028F BEGIN (*TSTstat*)
421 028F write(TestOut, 'STAT=', ord(Status):1)
422 02C7 END; (*TSTstat*)
423 02D0
424 02D0 PROCEDURE TSTmem;
425 02D0
426 02D0 BEGIN (*TSTmem*)
427 02D0 write(TestOut, 'MEMAVAIL=', memavail:1)
428 0308 END; (*TSTmem*)
429 0311
430 0311 PROCEDURE TSTfpos(VAR Fl: FileType
431 0311 );
432 0311
433 0311 BEGIN (*TSTfpos*)
434 0311 write(TestOut, 'FPOS=',
435 033A (*Fl.S:1, '/',*)
436 033A Fl.P:1)
437 034D END; (*TSTfpos*)
438 0356
439 0356 PROCEDURE TSTeit(Inx: ExternalImportTableIndexType
440 0356 );
441 0356
442 0356 BEGIN (*TSTeit*)
443 0356 WITH ExternalImportTable(.Inx.) DO
444 0377 writeln(TestOut, 'EITÆ', Inx:1, '/', CurExternalImportSymbolNo:1,
445 03C2 'Å=(SblNo=', SymbolNo:1, ')' )
446 03F6 END; (*TSTeit*)
447 03FF
448 03FF PROCEDURE TSTfnt(Inx: FileNameTableIndexType
449 03FF );
450 03FF
451 03FF BEGIN (*TSTfnt*)
452 03FF writeln(TestOut, 'FNTÆ', Inx:1, '/', CurFileNo:1,
453 0452 'Å=(FlNm=', FileNameTable(.inx.), ')' )
454 048D END; (*TSTfnt*)
455 0496
456 0496 PROCEDURE TSTiit(Inx: InternalImportTableIndexType
457 0496 );
458 0496
459 0496 BEGIN (*TSTiit*)
460 0496 END; (*TSTiit*)
461 04A4
462 04A4 PROCEDURE TSTmdt(Inx: ModuleTableIndexType
463 04A4 );
464 04A4
465 04A4 BEGIN (*TST*)
466 04A4 WITH moduleTable(.Inx.) DO
467 04CB BEGIN
468 04D0 write(TestOut, 'MDTÆ', Inx:1, '/', CurModuleNo:1,
469 051B 'Å=(MdNm#=', ModuleNameReference:1, ' ':2
470 0549 ,'Fn#=', FileNameReference:1, ' ':2
471 0579 ,'CurFlAddr=', CurrentFileAddress:1, ' ':2
472 05AC ,'Refd='
473 05BA );
474 05C7 TSTbool(Referenced);
475 05DE TSTln;
476 05E6 TSTindt; TSTindt; TSTindt;
477 05F4 writeln(TestOut ,'#Sgm=', NooSegments:1, ' ':2
478 0631 ,'#EIsbl=', NooExternalImportSymbols:1, ' ':2
479 0667 ,'EIT#=', EITOffset:1
480 0692 ,')'
481 0698 );
482 06A4 END
483 06A4 END; (*TST*)
484 06AA
485 06AA PROCEDURE TSTopt;
486 06AA
487 06AA BEGIN (*TSTopt*)
488 06AA writeln(TestOut, 'OPT=(LogKind=', ord(OptionTable.LogFileKind):1, ' ':2
489 06ED ,'TargetKind=', ord(OptionTable.TargetFileKind):1
490 0714 ,')' )
491 0723 END; (*TSTopt*)
492 072C
493 072C PROCEDURE TSTsct(Inx: SectionTableIndexType
494 072C );
495 072C
496 072C BEGIN (*TSTsct*)
497 072C WITH SectionTable(.Inx.) DO
498 0753 BEGIN
499 0758 writeln(TestOut, 'SCT=Æ', Inx:1, '/', SCTOffset:1, '/', CurSegmentCount:1
500 07B8 ,'Å=(Mdl#=', ModuleNo:1, ' ':2
501 07EB ,'Sgm#=', SegmentNo:1
502 0813 ,'#IISbl=', NooInternalImportSymbols:1
503 0840 );
504 0849 writeln(TestOut, ' ImSz=', ImageSize, ' ':2
505 0889 ,'RlSz=', RldSize, ' ':2
506 08B9 ,'RlConst=', RelocationConstant
507 08D4 ,')'
508 08E9 );
509 08F5 END
510 08F5 END; (*TSTsct*)
511 08FB
512 08FB PROCEDURE TSTvlt(Inx: SymbolTableIndexType
513 08FB );
514 08FB
515 08FB BEGIN (*TSTvlt*)
516 08FB END; (*TSTvlt*)
517 0909
518 0909
519 0909
520 0909 BEGIN (*LNKTST*)
521 0909 END.
«eof»