Page Byte Address Length Description
127 0 32512 96
Screen refresh buffer
Used by the routines at 59861, 60032, 61630, 61696, 62368 and 64599. Each byte of the screen refresh buffer (SRB) corresponds to a segment of 8 character squares on the screen, the leftmost of which will be at x=0, x=8, x=16 or x=24. Each bit set in an SRB byte corresponds to a character square in the segment that needs refreshing. Bit 7 corresponds to the leftmost character square in the segment, bit 0 to the rightmost character square.
Note that, owing to a quirk in the way the SRB-updating routine at 59861 works, the first 16 bytes of the screen refresh buffer correspond not to any part of the screen, but to the four rows of the play area that are immediately above the currently visible portion of the play area. Therefore, the screen-updating routine at 60032 ignores those bytes and starts inspecting SRB bytes at 32528 instead.
Note also that the routine at 28357 uses the first 16 bytes of the SRB as a temporary backup store for the submessage indicator and submessage addresses at 32641, and the routine at 64618 uses the first 32 bytes of the SRB as a temporary store for the top row of attribute bytes when scrolling the screen up and down.
127 96 32608 33
Message buffer
Used by the routine at 28357 to prepare a message before displaying it. Also used by the routines at 61838 and 61882 as temporary storage for one of the character buffers in groups 215-221.
127 129 32641 16
Submessage indicator and message addresses
Used by the routine at 28357.
127 145 32657 1
Unused
127 146 32658 5
Message 2: '{number}'
Used as a submessage of message 42. This message is cleared by the routine at 30458 when Sam picks up a phone, and updated by the routine at 30675 as Sam dials.
127 151 32663 2
Phone table entry address
Used by the routines at 30575 and 30627. Holds either the address of the second byte of the entry in the phone message table at 27467 or 27506 that corresponds to the phone that Sam is calling (if the person on the other end has a message for him) or picking up a call from, or the address of the final byte of the phone table at 27506 (if the person Sam's calling has no message to give); this address contains the number of the message corresponding to the name that Sam must give in order to receive the telephone message, or 0 if no name is required to receive the message, or 255 if the person Sam's calling will respond with message 46 (I DUNNO NO {name}).
127 153 32665 1
Time that Sam last lifted a ringing telephone
Checked by the routine at 30429 and set by the routine at 30458 (to the value of the second byte of the the system variable FRAMES, which is incremented every 5.12s).
127 154 32666 1
ID of the telephone that Sam is calling
Checked by the routines at 29952 (using the event entry at 24644) and 30511, and updated by the routines at 29149, 30575, 31244 and 61923.
127 155 32667 1
Telephone call status flags
Used by the routines at 30198, 30458, 30575, 30675 and 31244.
Bit(s) Meaning if set
0 Unused
1 The telephone call is finished (disconnected)
2,3 Unused
4 A digit is being dialled
5 The destination telephone is ringing
6 Sam must give a name in response to 'WHO'S THERE?'
7 Sam has picked up a ringing telephone
127 156 32668 2
Score
Checked by the routine at 61630, and updated by the routine at 28337.
127 158 32670 2
Bucks
Checked by the routines at 31594, 31642 and 61630, and updated by the routines at 24832 and 28295.
127 160 32672 2
Time the last message was displayed
Used by the routine at 28357. Holds the two least significant bytes of the system variable FRAMES as they were when the last message was displayed.
127 162 32674 6
Blown fuse delay counters
When a fuse is blown, the corresponding delay counter here is initialised by the routine at 29866. The delay counters are checked and decremented by the routine at 62468.
127 168 32680 1
Icon panel status flags
Used as a temporary buffer by the routines at 29668, 29733 and 30211. Each bit set here (by the routine at 29733 or 30211) corresponds to an icon that should be displayed in the panel.
Bit(s) Icon
7 Fuse/Budgie
6 Door/Hook
5 Light bulb
4 Telephone
0-3 Unused
127 169 32681 1
Main loop task timer
Decremented and checked on every pass through the main loop by the routine at 61440, and also checked by the routine at 61764.
127 170 32682 10
Door knock status flags
Used by the routines at 62120, 63304 and 63437. The bits in each byte here are used as follows:
Bit(s) Meaning if set
7 Somebody has just knocked on the door
6 Somebody is going to answer the door
0-5 Unused
127 180 32692 1
Blown fuse indicator
Used by the routine at 61948, which stores a non-zero value here if any fuses are currently blown.
127 181 32693 1
Unused
127 182 32694 1
Fuse flags
Used by the routines at 29866 and 30116. A bit set here indicates that the corresponding fuse has already been blown once. Bits 6 and 7 are unused.
Bit Fuse
0 No. 74
1 Hotel
2 No. 31
3 No. 19
4 No. 17
5 No. 15
127 183 32695 1
Index of the current message in the message queue
Used by the routines at 28357 and 30160.
127 184 32696 8
Message queue
Used by the routines at 28357, 30160 and 64121.
127 192 32704 4
Bullet buffer 1
Used by the routines at 25118, 26075 and 26224.
127 196 32708 4
Bullet buffer 2
Used by the routines at 25118, 26075 and 26224.
127 200 32712 1
Last value seen in the system variable FRAMES
Stores the value of the LSB of the system variable FRAMES as it stood at the end of the last pass through the main loop at 61483 or the routine at 30989.
127 201 32713 1
Current disguise
Checked by the routines at 29218, 29597 and 29952 (using the event entry at 24666), and changed by the routine at 63838. Holds the ID of Sam's current disguise.
ID Disguise
0 disguise0x1
1 disguise1x1
2 disguise2x1
3 disguise3x1
4 disguise4x1
5 disguise5x1
6 disguise6x1
7 disguise7x1
127 202 32714 6
Number string buffer
Used by the routine at 28186.
127 208 32720 2
Message 1: '{tens digit}/{name}'
Used as a submessage of messages 36, 40, 46 and 52. The message number of the name is inserted by the routine at 30575; the tens digit of the number of bucks is inserted by the routine at 31594 or 64338.
127 210 32722 1
Message number to watch in the message queue
Set by the routines at 24832, 30989 and 31126, and checked by the routine at 30972.
127 211 32723 1
ID of the telephone Sam is holding
Set by the routine at 30458 and checked by the routine at 30675.
127 212 32724 2
Time when the score was last incremented
Checked and set by the routine at 31414. Holds the value of the two least significant bytes of the system variable FRAMES as they were when the score was last incremented.
127 214 32726 5
Unused
127 219 32731 3
Location the police should head for when looking for Sam
Set by the routines at 29088 and 31289, and checked by the routine at 29361.
127 222 32734 2
Random number seed
Used by the routine at 61823.
127 224 32736 7
Unused
Data is copied here from the game status buffer template at 65504, but is never used.
127 231 32743 1
Bullet timer
Used by the routine at 26075.
127 232 32744 1
Disguise status flags
Modified by the routine at 29100, and checked by the routine at 29332. Each bit set here corresponds to a disguise that is known by the police. Bit 7 (corresponding to no disguise) is always set.
Bit Disguise
7 disguise0x1
6 disguise1x1
5 disguise2x1
4 disguise3x1
3 disguise4x1
2 disguise5x1
1 disguise6x1
0 disguise7x1
127 233 32745 1
Object inventory
Changed by the routine at 30211, and checked by the routines at 25420, 29952 (using the event entries at 24752 and 24774) and 31713. Each bit set here corresponds to an object in Sam's possession.
Bit(s) Object
0-5 Unused
6 Hook
7 Budgie
127 234 32746 1
Key inventory
Changed by the routines at 30211 and 31126, and checked by the routines at 29952 (using the event entries at 24586 and 24727) and 31289. Each bit set here corresponds to a key in Sam's possession.
Bit(s) Key
0-2 Unused
3 No. 74
4 No. 31
5 No. 27
6 No. 15
7 No. 19
127 235 32747 1
Police flags
Changed by the routines at 29149, 29952 (using the event entry at 24727), 31236, 31289 and 63281; checked by the routines at 29668, 31580, 31594 and 31998. The bits set here have the following meaning:
Bit(s) Meaning if set
0 Sam is wanted by the police
1-6 Unused
7 Sam is in jail
127 236 32748 2
High score
The high score is copied here from the game status buffer template at 65504 by the routine at 63662, but never used afterwards.
127 238 32750 1
Game mode indicator
Holds the current game mode (0-4). Checked by the routines at 29952 (using the event entry at 24544), 31126, 31414 and 61568, and updated by the routine at 63662.
Mode Meaning
0 Demo mode
1 The game has just started
2 Sam has entered no. 15 with the key
3 Sam has had the phone call about the key to no. 74 and gone to the top of the apartment building
4 The mob is after Sam
127 239 32751 1
Lives (first aid kits)
Used by the routines at 26002 and 29716. A first aid kit will be displayed in the icon panel for every bit that is set.
127 240 32752 10
Door status flags
Used by the routines at 30396, 61764, 62099 and 62120. In each flag byte here, bits 0-2 hold the door close delay timer (0 if the door is shut), and the set bit (if any) in bits 3-7 indicates the key that is required to unlock the door:
Bit Key
3 Key to no. 74
4 Key to no. 31
5 Key to no. 27
6 Key to no. 15
7 Key to no. 19
127 250 32762 1
Input device indicator
Set by the routine at 24951, and used by the routine at 60082. Holds 107 ('k') if the Kempston joystick is being used, or 0 otherwise.
127 251 32763 1
Number of the character just moved (215-229)
Used by the routine at 61948.
127 252 32764 1
Sam's status flags
Used by the routine at 29912 to decide how to deal with Sam.
Bit Meaning if set Routine
0 Sam is being carried by a gangster or policeman 31476
1 Sam is immobilised (after meeting Lana) 24832
2 Unused
3 Sam is rolling or somersaulting 25805
4 Sam is on the phone 30675
5 Sam is blowing a fuse 30146
Sam is switching a light on or off
Sam is raising or lowering a blind
Sam is throwing the hook
Sam is picking up an object
6 Sam is knocking on or opening a door 62216
7 Sam is falling from the roof of a building 64403
127 253 32765 1
Last key pressed
Set by the main loop at 61483, and checked by the routine at 60641. Holds the value from the keypress offset table corresponding to the last key pressed.
127 254 32766 1
x-coordinate of the leftmost column of the play area on screen
Checked by many routines, and modified by the routines at 59406 and 59461.
127 255 32767 1
y-coordinate of the topmost row of the play area on screen
Checked by many routines, and modified by the routines at 59516 and 59575.