RobotHardware.mesa
Created Saturday, June 9, 1984 10:52 pm PDT
Last edited by Eric Nickell, June 29, 1985 12:25:21 pm PDT
This module contains the routines necessary for actually running the robots in the arena. It mostly does the tag set-up calculations, producing an address and its contents, and passes this information to the RobotOpCodes module, letting it decide what to actually do, and then uses the returned information to alter the states of the robots in the arena.
DIRECTORY
RobotDefs USING [Memory, MemoryMap, MemoryIndex],
RobotEvaluator USING [SymbolTable];
RobotHardware:
CEDAR
DEFINITIONS ~ {
Memory: TYPE ~ RobotDefs.Memory;
MemoryIndex: TYPE ~ RobotDefs.MemoryIndex;
MemoryMap: TYPE ~ RobotDefs.MemoryMap;
ProcessRobot:
PROC [robot:
REF Memory]
RETURNS [addressWritten: MemoryMap];
This procedure performs one cycle of operations on the memory image passed.
addressWritten is only meaningful if ` FIRST[MemoryIndex].
InitialMemory:
PROC [code: Memory]
RETURNS [memory:
REF Memory];
Prepare a run-ready block of memory from the given program
InstallStandardSymbols:
PROC [s: RobotEvaluator.SymbolTable];
Addresses of various interesting things...
hx, mx, hy, my, hdmg, mdmg, direct, fire, speed: READONLY MemoryIndex;
}.