<> <> <> <> <<>> DIRECTORY BasicTime USING [GMT, nullGMT], Rope USING [ROPE]; RobotDefs: CEDAR DEFINITIONS ~ { Robot: TYPE ~ REF RobotRec; RobotRec: TYPE ~ RECORD [ version: REAL, --Version of RobotAssembler timeOfSource: BasicTime.GMT _ BasicTime.nullGMT, --Timestamp of source creator: Rope.ROPE _ NIL, --Credit where it's due code: Memory, --The actual program pic: RobotPic --What it looks like on-screen ]; <> MemoryIndex: TYPE ~ [0..256); Memory: TYPE ~ ARRAY MemoryIndex OF INTEGER _ ALL[0]; MemoryMap: TYPE ~ REF MemoryMapRep; MemoryMapRep: TYPE ~ PACKED ARRAY MemoryIndex OF BOOLEAN _ ALL[FALSE]; RobotPic: TYPE ~ ARRAY [0..16) OF PACKED ARRAY [0..16) OF BOOLEAN; RobotIndex: TYPE ~ [1..5]; --Legal robot numbers Robots: TYPE ~ ARRAY RobotIndex OF Robot; --Set of robots on the field of battle maxDamage: INT ~ 5; RobotState: TYPE ~ REF RobotStateRec; RobotStateRec: TYPE ~ RECORD [ memory: REF Memory, x, y: REAL _ 50.0, damage: INT _ 0, temperature: INT _ 0 ]; RobotStates: TYPE ~ ARRAY RobotIndex OF RobotState; Instruction: TYPE ~ MACHINE DEPENDENT RECORD [ immediate, indirect, indexed: BOOLEAN, opNum: [0 .. 31], tag: [0 .. 255] ]; }.