Text preview for : BcdList.mesa_Oct77.pdf part of xerox BcdList.mesa Oct77 xerox mesa 3.0_1977 listing BcdList.mesa_Oct77.pdf
Back to : BcdList.mesa_Oct77.pdf | Home
BedL1st.mesa Z5-0CT-77 14:57:38 Page 1
-- BedList.Mesa Edited by Sandman on August 31, 1977 10:Z1 AM
DIRECTORY
AltoDefs: FROM "altodefs",
BedDefs: FROM "beddefs".
CommanderDefs: FROM "eommanderdefs",
ControlDefs: FROM "eontroldefs",
IODefs: FROM "iodefs",
ListerDefs: FROM "listerdefs",
OutputDefs: FROM "outputdefs",
SegmentDefs: FROM "segmentdefs",
StringDefs: FROM "stringdefs",
SymDefs: FROM "symdefs";
DEFINITIONS FROM OutputDefs. BedDefs;
BedList: PROGRAM
IMPORTS CommanderDefs, IODefs, OutputDefs, SegmentDefs. StringDefs
EXPORTS LfsterDefs =
BEGIN
bed: POINTER TO BCD;
tb: CARDINAL;
ssb: STRING:
ctb: CARDINAL;
mtb: CARDINAL;
itb: CARDINAL;
etb: CARDINAL;
ftb: CARDINAL;
ntb: CARDINAL;
InstallBed: PROCEDURE [seg: SegmentDefs.FileSegmentHandle] =
BEGIN OPEN SegmentDefs;
size: CARDINAL;
IF -seg.swappedin THEN SwapIn[seg];
bed ~ FileSegmentAddress[seg];
IF (size~bed.nPages) # seg.pages THEN
BEGIN
Unloek[seg];
MoveFileSegment[seg,seg.base,size];
SwapIn[seg];
bed ~ FileSegmentAddress[seg];
END;
tb ~ LOOPHOLE[bcd];
ssb ~ LOOPHOLE[bed+bcd.ssOffset];
ctb ~ tb+bcd.ctOffset;
mtb ~ tb+bed.mtOffset;
itb ~ tb+bcd.impOffset;
etb ~ tb+bcd.expOffset;
ftb ~ tb+bcd.ftOffset;
ntb ~ tb+bed.ntOffset;
RETURN
END;
UnstallBed: PROCEDURE [seg: SegmentOefs.FileSegmentHandle]
BEGIN OPEN SegmentDefs;
IF seg.swappedin THEN Unlock[seg];
SwapOut[seg];
RETURN
END;
WriteBcdID: PROCEDURE [name: STRING. bcd: POINTER TO BCD]
BEGIN
PutString[name];
PutString[" configured 0];
PutTime[bcd.version.time];
IF bcd.source # [0,0] TIIEN
BEGIN
PutString[" from "];
PutName[bcd.source];
END;
PutString[" by"];
PrintMachine[bcd.version];
IFbcd.versionident # VersionID THEN
B[GIN PutString[" Obsolete VersionID "];
PutDecimal[bcd.versionident] [NO:
BcdList.mesa 25-0CT-77 14:57:38 Page 2
PutCR[];
PutString[" Configured by"];
PutTime[bcd.creator.time];
PutString[" "];
PrintMachine[bcd.creator];
PutCR[]; PutCR[];'
RETURN
END;
PrintBcd: PUBLIC PROCEDURE a
BEGIN
PrintHeader[]; PrintConfigs[];
PrintImports[] ; PrintExports[];
PrintModules[]; PrintFiles[];
RETURN
END;
PrintHeader: PUBLIC PROCEDURE a
BEGIN
PutString["Configurations: "]; PutDecimal[bed.nConfigs];
PutString[". Modules: a]; PutOecimal[bed.nModules];
PutString[". Imports: "J; PutDeeimal[bed.nImports];
PutString[". Exports: "J; PutDecimal[bcd.nExports];
PutString[". Dummy: "J; PutDeeimal[bcd.firstdummy]:
PutString[". #Dummies: "]: PutDecimal[bcd.nDummies]:
PutCR[]: PutCR[]:
RETURN
END:
PrintConfigs: PUBLIC PROCEDURE =
BEGIN
cti: CTIndex ~ FIRST[CTIndex]:
PutString["Configurations"]:
PrintIndex[bcd.ctOffset]:
PutChar[' :]; PutCR[]:
UNTIL cti = bcd.ctLimit DO
PrintConfig[cti];
cti ~ eti + SIZE[CTRecord]:
IF LOOPHOLE[cti,CARDINAL] > LOOPHOLE[bcd.ctLimit.CARDINAL] THEN GO TO Bogus:
REPEAT Bogus =) PrintGarbage[]:
ENDLOOP:
PutCR[]:
RETURN
END:
PrintConfig: PUBLIC PROCEDURE (cti: CTIndex] =
BEGIN OPEN ctb+cti:
Tab[2]:
PutName[name]; PrintIndex[cti]:
IF namedinstance TIIEN
BEGIN
PutString[", instance: "]:
PutInstanceName[[config[cti]]]:
END:
PutString[", file: a];
PrintFileName[file]; PrintIndex[file]:
IF config # CTNull THEN
BEGIN PutString[", parent: "]:
putName[(etb+config).name];
PrintIndex[config]:
END;
IF control # MTNull THEN
BEGIN PutString[". control: a]:
PutName[(mlb+cOnlrol).name];
PrintIndex[eontrol]:
rND;
PutCR[];
RETURN
END;
PrintImports: PUBLIC PROCrDURE =
BEGIN
itl: IMPlndex" FIRST[IMPIndex];
PutSlring["Tmports"];
Pr intIndex[bcd. impOffset]:
PUlChar[':); PulCR[];
BcdL 1st. mesa 25-0CT-77 14:57:38 Page 3
UNTIL 1t1 = bcd.1mpL1m1t DO
Pr1ntImport[it1]:
1t1 ~ 1t1 + SIZE[IMPRecord]:
IF LOOPHOLE[1t1,CARDINAL] > LOOPHOLE[bcd.1mpL1mit,CARDINAL] THEN GO TO Bogus:
REPEAT Bogus => Pr1ntGarbage[]:
ENDLOOP:
PutCR(]:
RETURN
END:
PrintImport: PUBLIC PROCEDURE [iti: IMPIndex] =
BEGIN OPEN itb+it1:
Tab[2]:
PutName[name]: PrintIndex[it1]:
IF port = module THEN PutString(" (module)"];
IF named instance THEN
BEGIN
PutString[", instance: "]:
PutInstanceName[[import[iti]]];
END:
PutString[", f11e: "];
PrintFileName[file]: PrintIndex[f1le]:
PutStringC", gfi: 0]:
PutDecimal[gfi]:
PutString[", ngfi: "]:
PutOecimal[ngfi]:
PutCR[]:
RETURN
END:
PrintExports: PUBLIC PROCEDURE =
BEGIN
eti: EXPIndex ~ FIRST[EXPIndex]:
PutString["Exports"]:
PrintIndex[bcd.expOffset]:
PutChar[':]: PutCR[]:
UNTIL eti = b~d.expLimit 00
PrintExport[eti]:
eti ~ eti + (etb+eti).size + SIZE[EXPRecord]-l;
IF LOOPHOLE[eti,CARDINAL] > LOOPHOLE[bcd.expLimit,CARDINAL] THEN GO TO Bogus;
REPEAT Bogus => PrintGarbage[]:
ENOLOOP;
PutCR[] ;
RETURN
END:
PrintExport: PUBLIC PROCEDURE [et1: EXPIndex] =
BEGIN OPEN etb+eti:
i: CARDINAL: Tab[2];
PutName[name]: PrintIndex[eti]:
IF port = module THEN PutString(" (module)"]:
IF namedinstance THEN
BEGIN
PutString(", instance: "]:
PutInstanceName[[export[eti]]]:
END:
PutString[", file: "]:
PrintFileName(file]: PrintIndex[file]:
PutString[". size: "]:
PutDecimal[size]:
IF DumpLinks THEN
BEGIN
PutString[". 1 inks: "]:
FOR i IN [0 .. siLe) DO
IF i '