<> <> <> DIRECTORY Atom USING [PropList], DragOpsCross USING [Byte, Inst, ShortRegQR, Word], HandCoding; HandCodingSupport: CEDAR DEFINITIONS = BEGIN OPEN DragOpsCross, HandCoding; CARD: TYPE = LONG CARDINAL; Inst: TYPE = DragOpsCross.Inst; PropList: TYPE = Atom.PropList; <> OQBcommon: PROC[op: Inst, rest: Word]; OIcommon: PROC[op: Inst]; LRcommon: PROC[op: Inst, reg: RegSpec]; QRcommon: PROC[op: Inst, left: ShortRegQR, right: RegSpec]; OBcommon: PROC[op: Inst, lit: Lit8]; LRBcommon: PROC[op: Inst, reg: RegSpec, lit: Lit8]; RRcommon: PROC[op: Inst, c: RegSpec, a,b: RegSpec]; RJBcommon: PROC[op: Inst, left: ShortRegSpec, right: RegSpec, dist: Lit8]; ODBcommon: PROC[op: Inst, lit: Lit16]; LRRBcommon: PROC[op: Inst, reg1,reg2: RegSpec, disp: Lit8]; JBBcommon: PROC[op: Inst, dist: Lit8, lit: Lit8]; <> Area: TYPE = REF AreaRep; AreaRep: TYPE = RECORD [ name: ATOM, -- name of output area props: PropList, -- properties for this area currentPC: CARD, -- current output program PC (byte address) currentData: CARD, -- current output data PC (byte address) currentWord: Word, -- current partial word currentDirty: BOOL, -- TRUE if the current word was written getWord: GetProc, -- proc to get a word from the area putWord: PutProc, -- proc to put a word into the area data: REF -- data for getWord/putWord ]; GetProc: TYPE = PROC [data: REF, pc: INT] RETURNS [Word]; PutProc: TYPE = PROC [data: REF, pc: INT, word: Word]; ProcList: TYPE = LIST OF PROC; NewArea: PROC [name: ATOM, getWord: GetProc, putWord: PutProc, data: REF _ NIL] RETURNS [Area]; <> GenWithArea: PROC [area: Area, list: ProcList]; <> <<>> Gen1WithArea: PROC [area: Area, proc: PROC]; <> <<>> ForceOut: PROC [area: Area]; <> <<>> GetCurrentArea: PROC [nilOK: BOOL _ FALSE] RETURNS [Area]; EmptyArea: ERROR; <> <> <<(if area = NIL, gets the area from the current area established by GenWithArea)>> <<>> GetOutputPC: PROC [area: Area _ NIL] RETURNS [pc: CARD]; <> SetOutputPC: PROC [pc: CARD, area: Area _ NIL]; <> WordAlign: PROC [area: Area _ NIL]; <> ReserveData: PROC [words: CARD, area: Area _ NIL] RETURNS [pc: CARD]; <> <> <<(if area = NIL, gets the area from the current area established by GenWithArea)>> <<>> OutputByte: PROC [area: Area, byte: Byte]; <> <<>> OutputOneByte: PROC [area: Area, word: Word]; <> <<>> OutputAlphaBeta: PROC [area: Area, lit: CARDINAL]; <> <<>> OutputAlphaBetaGammaDelta: PROC [area: Area, word: Word]; <> <<>> OutputWord: PROC [area: Area, word: Word, align: BOOL _ FALSE]; <> END.