DEFINITION MODULE CompilerShared ; (* State shared by the Compiler modules: the image buffer, program counter, patch list, source/error state, and the error reporter. Keeping this in a small definition module is the first step of splitting the old monolithic Compiler.mod; identifiers are imported unqualified so the parser and code generator read exactly as before. *) FROM SYSTEM IMPORT BYTE ; CONST MaxCode = 0A000H ; CodeMax = 0A000H ; MaxPatch = 2000 ; EMemOvf = 98 ; ECompOvf = 99 ; EFileNF = 90 ; EInclNest = 96 ; TYPE PatchRec = RECORD place : CARDINAL ; target : CARDINAL ; filled : BOOLEAN ; END ; VAR cbuf : ARRAY [0..MaxCode - 1] OF BYTE ; pc : CARDINAL ; imgReady : BOOLEAN ; patches : ARRAY [0..MaxPatch - 1] OF PatchRec ; nPatch : CARDINAL ; srcPos : CARDINAL ; abortFac : BOOLEAN ; errNum : CARDINAL ; txerrPos : CARDINAL ; PROCEDURE Err (n : CARDINAL) ; PROCEDURE OK () : BOOLEAN ; END CompilerShared.