Address Length Description
27400 2
Title screen countdown timer
Used by the routine at 24576. Decremented from 140 until it reaches zero, after which demo mode begins.
27402 1
Active guard counter
Initialised by the routine at 24576, and used by the routines at 26988, 27044 and 27170. Supposed to hold the number of active guards minus one, but may not because of a bug.
27403 1
Game mode indicator
Used by the routines at 24576, 25167, 26426 and 27464. Holds 0 in demo mode, or 1 in game mode.
28070 8
Guard countdown timers
Initialised by the routine at 27170, and used by the routines at 25399, 25886, 26146, 26276, 26426, 26887 and 26988. When a guard's countdown timer reaches 0, the guard is brought into play.
28078 2
Guard panic timer
Initialised by the routine at 24576, and used by the routines at 25562, 26173, 26276 and 26730. Holds a non-zero value when the guards are panicking.
28080 2
Temporary store for a guard's screen x- and y-coordinates
Used by the routine at 25562.
28082 4
Temporary store for direction probability parameters
Used by the routine at 25167 (when moving Horace in demo mode) and 25562 (when moving a guard).
28086 2
Buffer address of the guard currently being handled
Used by the routines at 27199 and 27242.
28088 43
Temporary guard buffer
The contents of a guard's buffer (see 28131) are copied here by the routine at 27199 whenever the guard needs to be moved, drawn or otherwise examined. After that, the updated contents are copied back to the original location by the routine at 27242.
28131 172
Guard buffers
Used by the routines at 27199 and 27242. See 28088 for a description of the contents of a guard's buffer.
28623 8
Tunnel offset and bell, initial guard and entrance locations for the current maze
Used by the routines at 24576, 25399, 25562, 26276, 26730 and 27294. The values here are copied from 28631, 28639, 28647 or 28655.
31841 1
Sprite movement timer
Initialised by the routine at 24576, and used by the routine at 25399. Decremented on each pass through the main loop; when it reaches zero, Horace and the guards are moved.
31842 1
Game speed parameter (1-8)
Initialised to 8 by the routine at 24576 and decremented every time Horace returns to maze 1 via maze 4. Also used by the routines at 25399, 25562, 26730, 27044 and 27170. The value here determines the speed at which the game runs.
31843 1
Current maze number
Initialised to 255 by the routine at 24576 just before a game starts. Holds 0, 1, 2 or 3 while a game is in progress.
31844 1
Redundant temporary variable
Used by the routine at 25562.
31845 2
Lunch-drop countdown timer
Initialised by the routine at 24576, and used by the routine at 26914. When this timer reaches zero, one of the guards will drop his lunch.
31847 2
Address of the next pseudo-random number
Initialised by the routine at 24576, and used by the routine at 27410. Always holds a value between 0 and 8191.
31849 1
Sound on/off indicator
Initialised by the routine at 24576, and used by the routines at 25399, 26017, 26276, 26426, 27022, 27044 and 27255. Holds 00011111 binary if the sound is on, or 00000111 binary otherwise.
31850 1
'T' pressed indicator
Initialised by the routine at 24576, and used by the routine at 27022. Holds 0 if 'T' was being pressed the last time it was checked, or 16 otherwise.
31851 2
Horace's current location
Initialised by the routine at 24576, and used by the routines at 25167, 25399, 25562, 25886, 26426, 26657 and 26730. Holds the display file address minus 16384.
31853 2
Horace's new location
Initialised by the routine at 24576, and used by the routines at 25399, 25886, 26017, 26276 and 26657. Holds the display file address minus 16384.
31855 1
Temporary store for direction keypress
Used by the routine at 25167.
31856 1
Horace's animation frame (0-3)
Initialised by the routine at 24576, and used by the routines at 25167, 25399 and 26657.
31857 1
Horace's attribute byte
Initialised by the routine at 24576, and used by the routines at 26426 and 26657.
31858 1
Horace's walking animation timer
Used by the routine at 26657. Incremented whenever Horace is drawn; bit 4 determines which set of animation frames (see 31943) is used: 0-3 if it's set, or 4-7 otherwise.
31859 2
Score
Initialised by the routine at 24576, and used by the routines at 26017, 26276, 26426 and 26730.
31861 2
High score
Used by the routines at 24576 and 26426.
31863 1
Extra life indicator
Initialised by the routine at 24576, and used by the routine at 26017. Holds INT(S/10000)+2, where 'S' is the current score. When this value changes, Horace gets a new life.
31864 1
Number of lives remaining
Initialised by the routine at 24576, and used by the routines at 26017 and 26426.
31865 1
Tunnel timer
Used by the routines at 25167, 25399, 26017, 26426 and 26657. Holds a non-zero value when Horace is in a tunnel.
31866 2
Temporary store for Horace's screen x- and y-coordinates
Used by the routine at 25562.
31940 2
Bell location
Initialised by the routine at 24576, and used by the routines at 26730 and 27044. Holds the location of the bell in the current maze, or zero if Horace has sounded the alarm.
31942 1
Bell animation frame counter
Used by the routines at 26730 and 27044. Incremented on each pass through the main loop; its value determines which bell animation frame is used (see 32519), and also the bell sound effect.