<> <> <> <> <<>> DIRECTORY TamarinOps USING [Inst, Word], MonkeyHeart USING [Processor]; MonkeyTweaker: CEDAR DEFINITIONS = BEGIN OpcodeHandler: TYPE = PROC [ data: REF, -- callback data processor: MonkeyHeart.Processor, -- the processor executing the instruction inst: TamarinOps.Inst, -- the instruction rest: TamarinOps.Word] -- the operand (right-justified) RETURNS [normal: BOOL _ FALSE]; -- normal => do normal opcode processing Register: PROC [inst: TamarinOps.Inst, handler: OpcodeHandler, data: REF _ NIL]; OpcodeRegistry: TYPE = REF OpcodeRegistryRep; OpcodeRegistryRep: TYPE = ARRAY TamarinOps.Inst OF OpcodeRegistryEntry; OpcodeRegistryEntry: TYPE = RECORD [handler: OpcodeHandler, data: REF]; END.