Address Length Description
7F00 84
Screen refresh buffer (SRB)
Used by the routines at 6130, 62A0, 670C, 68E1 and 691E. Each byte of the 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.
7F54 6
Buffer for the Blue Room blackboard
Used by the routines at 5E45, 5E6F, 6791, 680F and 6880.
7F5A 6
Buffer for the Yellow Room blackboard
Used by the routines at 5E45, 5E6F, 6791, 680F and 6880.
7F60 6
Buffer for the blackboard in the top-floor classroom of the girls' skool
Used by the routines at 5E45, 5E6F, 6791, 680F and 6880.
7F66 6
Buffer for the Science Lab blackboard
Used by the routines at 5E45, 5E6F, 6791, 680F and 6880.
7F6C 6
Buffer for the blackboard in the middle-floor classroom of the girls' skool
Used by the routines at 5E45, 5E6F, 6791, 680F and 6880.
7F72 14
Unused
7F80 1
Various flags
Various status flags for the current lesson.
Bit Meaning if set
0 End of lesson/playtime (always reset)
1 MR WACKER is looking for ERIC to expel him (see F532)
2 MR WACKER is looking for the truant ERIC (see F4CC)
3 EINSTEIN is talking (set and checked by F017; reset and checked by F000)
4 Lines reprimand toggle for the teacher fetching ERIC (see 7D3E)
5 MISS TAKE is chasing ERIC (see 7D3E)
6 ERIC should be in class (set by F100), dinner (set by F0BF) or assembly (set by F0DA) (checked by 7D3E)
7 Kids should be sitting in the assembly hall (set by F0DA; reset by F250; checked by 6D00 and 7D3E, and by command lists 0x14, 0x28 and 0x58)
ERIC's teacher's next absence reprimand should be STAY TILL I DISMISS YOU instead of DON'T BE LATE AGAIN (set and checked by F100)
ERIC should be sitting down in class (set by F100; checked by 7D3E)
7F81 1
Lesson signal flags
Used by the classroom-based command lists to indicate that or check whether a teacher has arrived at the classroom door to start the lesson.
Bit(s) Meaning if set
0 Teacher has arrived at the top-floor classroom in the girls' skool
1 Teacher has arrived at the middle-floor classroom in the girls' skool
2 Teacher has arrived at the Blue Room
3 Teacher has arrived at the Yellow Room
4 Teacher has arrived at the Science Lab
5-7 Unused
7F82 6
Unused
7F88 2
Message 6: '{teacher}'
Used by the routine at 7EB1 when printing the top line of text in the lesson box; it is a submessage of message 0x10.
7F8A 2
Message 5: '{lines recipient}/combination number or letter/{room}'
Used by the routines at 7414 (as a submessage of message 0x0D), 74C8 (as a submessage of message 0x0E) and 7EB1 (as a submessage of message 0x10).
7F8C 2
Message 10: '{mountain}/{king}/{animal}/{verb}'
Used by the routines at F100 and F250; it is a submessage of messages 0x4A, 0x4B, 0x4E, 0x4F, 0x52, 0x53 and 0x60.
7F8E 2
Message 11: '{country}/{year}/{habitat}/{noun}'
Used by the routines at F100 and F250; it is a submessage of messages 0x49, 0x4C, 0x4D, 0x50, 0x51, 0x54 and 0x60.
7F90 2
Message 7: '{grassee}'
Used by the routine at F100 to hold the character number of whoever is being grassed up by EINSTEIN for writing on the board (0xCE=BOY WANDER, or 0xD2=ERIC); it is a submessage of message 0x58. Note that storing the character number (0xCE or 0xD2) here is a mistake; it should be the message number of the character's name (0x1B or 0x1F) instead. In any case, this message (along with parent message 0x58) is never used, because of a bug in the section of code at F19C.
7F92 10
Unused
7F9C 8
Bike and Science Lab storeroom combinations
Used by the routines at 5DDC and F5BE.
7FA4 8
Copy of the bike and Science Lab storeroom combinations
Used by the routine at 7552. The digits or letters discovered by ERIC have bit 7 set (to indicate that he has already scored points for doing so).
7FAC 43
Unused
7FD7 1
Various ERIC-related data (1)
Used in conjunction with the contents of 7FD8. Holds the ASCII code of the last key pressed while writing on a blackboard (see 5E6F), or the descent table identifier (0xFC-0xFF; see FBCC), or the LSB of the address of a routine (or an entry point to a routine) for dealing either with ERIC or with the result of an action by ERIC (see E145):
Address Purpose Placed here by
5D45 Remove the water pistol from the inventory 5D37
5ED0 Deal with ERIC when he's raising his fist 5EC7
5EE2 Deal with ERIC when he's lowering his fist
5EF0 Deal with ERIC when he's raising the catapult 5EE8
5EFA Launch a pellet from ERIC's catapult
5F04 Deal with ERIC after he's launched a catapult pellet
5F8A Deal with ERIC when he's kissing HAYLEY 5F1C
7AE6 Release some mice E225
7B55 Make ERIC catch a mouse or frog (if present) E125
F862 Deal with a dropped stinkbomb 7140
F9AB Control water fired from the pistol F99A
7FD8 1
Various ERIC-related data (2)
Used in conjunction with the contents of 7FD7. Holds the identifier of the blackboard ERIC wrote on (see 5E45), or the descent table entry pointer (0xA0-0xB4; see FBCC), or the MSB of the address of a routine (or an entry point to a routine) for dealing either with ERIC or with the result of an action by ERIC (see E145, and 7FD7 for a list of the routine and entry point addresses).
7FD9 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 (see F6EA).
7FDA 1
ID of the desk containing the water pistol
Used by the routine at F2E2.
7FDB 1
ID of the desk containing the stinkbombs
Used by the routine at F2E2.
7FDC 1
ERIC's stand-up delay counter
Used by the routine at F2E2 while in demo mode.
7FDD 1
ERIC's knockout delay counter
Used by the routine at F28E.
7FDE 1
Game mode indicator
Used by the routines at 5D63, 7EB1, F2E2 and F6D5. Holds 0xFF if in demo mode, 0x00 if a game is in progress, or 0x01 if ERIC has just opened the safe.
7FDF 1
Current lesson number
Used by the routine at F74D. Holds the index (0xC0-0xFF) into the main timetable. Adjusted by the routine at F5BE before starting a new game.
7FE0 1
Lesson descriptor
Used by the routines at 7D15, 7D3E, 7EB1, F100 and F74D. The room ID is stored in bits 0-3, and the teacher ID in bits 4-7. See the list of lesson descriptors at D225.
7FE1 1
Number of mice caught
Used by the routines at 7AE6, 7B0E and 7B55.
7FE2 1
Kiss counter
Used by the routines at 5F1C (which decreases the counter by 7 whenever ERIC kisses HAYLEY) and 7596 (which decreases the counter by 1 whenever HAYLEY is knocked over). Initialised to 0x28 by the routine at F5BE.
7FE3 2
Lesson clock
Decremented in the main loop at F6EA. When it reaches 0, it is reset to 1000 by the routine at F74D. It is also checked by the routines at 7596, 7D3E, F073, F0BF and F0DA, and modified by the routines at 7596, F250, F532, F55F and F5BE.
7FE5 2
Score
Used by the routine at 73B5.
7FE7 2
Lines total
Used by the routines at 5F1C and 73CB.
7FE9 2
Hi-score
Used by the routine at F55F.
7FEB 1
Inventory flags
Used by the routine at 7C02. Bit set=got, bit reset=haven't.
Bit Item Set Reset Checked
0 Safe key 7854 5D63, 7854
1 Science Lab storeroom key 5DDC 5DDC, 73F1, 7615, 7A16
2 Frog 7BF5 7316 7316
3 Water pistol (with water if bit 4 reset) F2E2 5D37 5D37, 5D63, F99A
4 Water pistol with sherry 5D63 5D37 5D37, 5D63, F99A, FA4D
5 3 stinkbombs F2E2 F862
6 2 stinkbombs F2E2 F862
7 1 stinkbomb F2E2 F862 7140
7FEC 1
Input device indicator
Set by the routine at 54A0, and checked by the routine at 71BE. Holds 0 if the keyboard is being used, or 1 if the Kempston joystick is being used.
7FED 1
ERIC's secondary status flags
Used by the routine at F7AD to decide how to deal with ERIC when bit 1 is set at 7FFB.
Bit Meaning if set Routine
0 ERIC is riding the bike 725E
1 ERIC is standing on a plant or plant pot FB3C
2 ERIC is stepping off a plant, a plant pot, or the stage FB03
3 ERIC is falling and will land on his feet FBA0
4 ERIC is falling and will not land on his feet FBCC
5 ERIC has stepped out of the top-floor window 5D33
6 ERIC is falling from the saddle of the bike 5D23
7 ERIC is standing on the saddle of the bike 7316
7FEE 1
Last key pressed while riding the bike
Used by the routine at 725E. Holds the value from the keypress offset table corresponding to the last key pressed while riding the bike.
7FEF 1
Counter that determines the bike's speed while ERIC's on it
Used by the routine at 725E.
7FF0 1
Bike's momentum
Used by the routine at 725E.
7FF1 1
Last key pressed
Set by the routine at F6EA; checked by the routines at 6DD2 and 6E38. Holds the value from the keypress offset table corresponding to the last key pressed.
7FF2 1
ERIC's midstride/mid-action timer
Zero unless ERIC is midstride (see 6DD2) or mid-action (see E145); if non-zero, the value is copied to the main action timer at 7FF3 after ERIC has been moved from the midstride or mid-action position (see F6EA).
7FF3 1
ERIC's main action timer
Decremented by the main loop at F6EA; when it becomes zero, the keyboard is checked and ERIC is moved accordingly. Also used by many routines that deal with ERIC to decide when to change ERIC's animatory state or location, or when to check the keyboard.
7FF4 1
Door/window status flags
Used by the routine at 7040. Bit set=open, bit reset=closed.
Bit Door/window
0 Left study door
1 Right study door
2 Science Lab storeroom door
3 Boys' skool door
4 Skool gate
5 Drinks cabinet door
6 Top-floor window
7 Middle-floor window
7FF5 1
Character number of the teacher who last gave ERIC lines
Used by the routine at 7D3E.
7FF6 1
LSB of the lines-giving delay counter
Used by the routine at 7D20. Also used by the routine at 70CD when timing the closing of the left study, right study and Science Lab storeroom doors.
7FF7 1
MSB of the lines-giving delay counter
Used by the routines at 7D20 and 7D3E.
7FF8 1
LSB of the address of the SRB byte corresponding to the lip of the speech bubble
Used by the routine at 694E. Holds 0 if no one's speaking.
7FF9 1
Speech bubble lip SRB bit
The bit set at this byte indicates the bit of the SRB byte (referred to by 7FF8) that corresponds to the lip of the speech bubble (see 694E).
7FFA 1
Leftmost column of the play area on screen the last time the SRB was updated for the speech bubble
Holds the column of the play area that was at the far left of the screen the last time the routine at 68E1 (update the SRB for the speech bubble) was called.
7FFB 1
ERIC's primary status flags
Used by the routine at F7AD to decide how to deal with ERIC.
Bit Meaning if set Routine
0 ERIC is jumping 5D63
1 Examine the secondary status flags at 7FED
2 ERIC is sitting or lying down F2E2
3 ERIC is bending over E145
ERIC is dropping a stinkbomb
ERIC is firing the water pistol
ERIC is moving forward as if to kiss (but will miss)
4 ERIC is writing on a blackboard 5E6F
5 ERIC is firing the catapult 5EAD
ERIC is hitting
ERIC is kissing HAYLEY
6 MR WACKER is expelling ERIC
7 ERIC has been knocked over F28E
7FFC 1
Number of the character just moved (0xB7-0xD6)
Used by the routine at 62D0.
7FFD 2
Random number seed
Used by the routine at 6291.
7FFF 1
x-coordinate of the leftmost column of the play area on screen
Modified by the routines at 61C2 and 61F8.