Text preview for : ListCode.mesa_Sep78.pdf part of xerox ListCode.mesa Sep78 xerox mesa 4.0_1978 listing Mesa_4_Lister ListCode.mesa_Sep78.pdf



Back to : ListCode.mesa_Sep78.pdf | Home

ListCode.mesa 2-Sep-78 18:18:51 Page 1



-- ListCode.mesa; edited by Johnsson; July 20, 1978 12:17 PM
DIRECTORY
AltoDefs: FROM "altodefs",
BedDefs: FROM "beddefs",
CommanderDefs: FROM "commanderdefs",
ControlDefs: fROM "eontroldefs",
InlineDefs: fROM "inlinedefs",
IODefs: FROM "iodefs~,
ListerDefs: fROM "listerdefs",
Mopeodes: fROM "mopeodes",
OpTableDefs: FROM "optabledefs",
OutputDefs: FROM "outputdefs",
SegmentDefs: FROM "segmentdefs",
StreamDefs: FROM "streamdefs",
StringDefs: FROM "stringdefs",
SymDefs: FROM "symdefs",
SymbolTableDefs: FROM "symboltabledefs",
TimeDefs: FROM "timedefs";
DEFINITIONS FROM OutputDefs;
ListCode: PROGRAM
IMPORTS CommanderDefs, IODefs, ListerDefs, OpTableDefs, OutputDefs, SegmentDefs, StreamDefs,
StringDefs, SymbolTableDefs
EXPORTS ListerDefs SHARES SymbolTableDefs a
BEGIN
BYTE: TYPE = AltoDefs.BYTE;
FileSegmentHandle: TYPE = SegmentDefs.FileSegmentHandle;
FrameHandle: TYPE = ControlDefs.FrameHandle;
NumberFormat: TYPE = IODefs.NumberFormat;
opcode: TYPE = BYTE;
PageCount: TYPE = AltoDefs.PageCount;
WordPC: TYPE = ControlDefs.WordPC;


JumpOp: TYPE = [Mopeodes.zJ2 .. Mopcodes.zJIW];
InstWord: TYPE = MACHINE DEPENDENT RECORD[oddbyte, evenbyte: BYTE];
offset: CARDINAL;
eodebase: POINTER;
codepages: PageCount;
symbols: SymbolTableDefs.SymbolTableBase;
Tinst, Tbytes, Pinst, Pbytes, Bbytes: CARDINAL;
freqing: BOOLEAN ~ FALSE;
absolute: BOOLEAN ~ FALSE;
-- number formats
decimal: NumberFormat = NumberFormat[base:l0, columns:l, zerofill:FALSE, unsigned:TRUE];
decima13: NumberFormat = NumberFormat[base:l0, eolumns:3, zerofill:FALSE, unsigned:TRUE];
octa13: NumberFormat = NumberFormat[base:8, columns:3, zerofill :FALSE, unsigned:TRUE];
octa13z: NumberFormat = NumberFormat[base:8, columns:3, zerofill:TRUE, unsigned:TRUE];
octa15 NumberFormat NumberFormat[base:8, columns:5, zerofill :FALSE. unsigned:TRUE];
octa16 NumberFormat NumberFormat[base:8. columns:6. zerofill :FALSE. unsigned:TRUE]:
octal1 NumberFormat = NumberFormat[base:8. columns:l, zerofill :FALSE, unsigned:TRUE];
ListCode.mesa 2-Sep-78 18:18:51 Page 2


-- generate list of opcodes
OpcodeList: PROCEDURE [root: STRING] a
BEGIN OPEN OpTableDefs;
op: STHING;
length: [0 .. 3];
i: opcode;
digit: STHING