<> <> <> DIRECTORY DragOpsCross USING [FieldDescriptor, ProcessorRegister, Word], HandCoding USING [ConstSpec, Lit16, Lit8, RegSpec], HandCodingSupport USING [Area], IO USING [STREAM], Rope USING [ROPE], SymTab USING [Ref]; HandCodingPseudos: CEDAR DEFINITIONS = BEGIN OPEN DragOpsCross, HandCoding; <> <> Label: TYPE = REF LabelRep; LabelRep: TYPE = RECORD [ area: HandCodingSupport.Area, -- area for definition of label (NIL if undefined) name: Rope.ROPE, -- the global name (if any) for this label offset: INT, -- offset for definition of label uses: REF -- uses of label that need fixing (internal) ]; SetLabel: PROC [label: Label]; GenLabel: PROC RETURNS [label: Label]; GenLabelHere: PROC RETURNS [label: Label]; UseLabel8A: PROC [label: Label] RETURNS [Lit8]; <> UseLabel8B: PROC [label: Label] RETURNS [Lit8]; <> UseLabel16: PROC [label: Label] RETURNS [Lit16]; UseLabel32: PROC [label: Label] RETURNS [Word]; MakeLabelGlobal: PROC [name: Rope.ROPE, label: Label]; GetGlobalLabel: PROC [name: Rope.ROPE] RETURNS [Label]; GetGlobalLabelTable: PROC [area: HandCodingSupport.Area _ NIL] RETURNS [SymTab.Ref]; ShowGlobalLabelTable: PROC [st: IO.STREAM, sortNames: BOOL _ TRUE, area: HandCodingSupport.Area _ NIL]; <> <> LReg: PROC [reg: RegSpec]; PReg: PROC [reg: RegSpec]; SReg: PROC [reg: RegSpec]; AddReg: PROC [reg: RegSpec, const: ConstSpec]; SubReg: PROC [reg: RegSpec, const: ConstSpec]; SetRegConst: PROC [reg: RegSpec, const: ConstSpec]; MoveReg: PROC [dst,src: RegSpec]; MoveRegI: PROC [dst,src: RegSpec, const: ConstSpec]; LRegI: PROC [reg: RegSpec, const: ConstSpec]; IndexedJump: PROC [dest: Label, long: BOOL _ FALSE, back: BOOL _ FALSE]; <> ProcedureEntry: PROC [label: Label, args: [0..15], dontChangeRL: BOOL _ FALSE]; <> < generate procedure entry instruction>> ProcedureExit: PROC [rets: [0..15], dontChangeSP: BOOL _ FALSE]; <> < RETN>> < RET>> SetupField: PROC [fd: DragOpsCross.FieldDescriptor]; <> ExtractField: PROC [first: [0..31], bits: [0..31]]; <> ShiftLeft: PROC [bits: [0..31]]; <> <> LoadProcessorReg: PROC [which: DragOpsCross.ProcessorRegister]; <> StoreProcessorReg: PROC [which: DragOpsCross.ProcessorRegister]; <> CauseReschedule: PROC; <<... causes a reschedule interrupt when interrupts are next enabled (possibly immediately). The state of traps enabled/disabled is not changed.>> CauseReset: PROC; <<... causes a reset trap.>> GetSPLimit: PROC; <<... push stack limit.>> SetSPLimit: PROC; <<... pop stack to stack limit register.>> GetYoungestPC: PROC; <<... pushes the youngest PC entry in the IFU stack (into [S]).>> GetYoungestStatus: PROC; <<... pushes the status part of the youngest IFU stack entry. >> GetEldestPC: PROC; <<... pushes the eldest PC in the IFU stack and removes the eldest entry from the IFU stack. The results are undefined if there was no PC to get.>> GetEldestStatus: PROC; <<... pushes the status part of the eldest IFU stack entry. >> SetYoungestPC: PROC; <<... sets the youngest PC entry in the IFU stack (from [S]). S_S-1.>> SetYoungestStatus: PROC; <<... sets the youngest status entry in the IFU stack (from [S]). S_S-1.>> SetEldestPC: PROC; <<... causes a new eldest IFU stack entry to be created and sets the PC part of that entry (from [S]). S_S-1.>> SetEldestStatus: PROC; <<... sets the status part of the eldest IFU stack entry (from [S]).>> <> Pause: PROC; <<... Instructs the interpreter to pause. This emits the X0 operation.>> Halt: PROC [code: CARDINAL]; <<... Instructs the interpreter to halt. The code will be evident in the instruction trace. This emits the X377 operation.>> END.