Address Length Description
AD76 135
Table: Item Locations
One byte per item. The value is the room the item is in, 00 when the item is inactive, and the inventory room when the player is carrying it.
AE76 1
Flags: Room Change
One byte of once-only and room-change flags. Bits 00 and 01 are tested when entering or leaving The Hall of the Phoenix, but the shipped game never sets them. Bit 03 is tested after taking the copper key, but is never set.
Bit Relating To
00 Enter The Hall of the Phoenix without dying
01 Skip the phoenix transformation
02 Revealing the jewelled key under the carpet
03 Awarding points for the copper key
04 Awarding points for the gold key
05 Awarding points for the jewelled key
06 Unused
07 Unused
AE77 1
Flag: Beach Dug
Bit 0 is set once the player has dug on the beach in room 3C.
AE78 1
Flag: Turn Scratch
Cleared at the start of every pass round the game loop.
AE79 1
Room: Pour Return
Holds the room ID to restore after pouring.
AE7E 2
Table: Already Seen Room Images
Corresponds to whether the player has already seen the image for the following rooms:
Bit Room ID Room Name
00 03 In the Field
01 0E The Monastery
02 1C The King's Chamber
03 27 The Oil Room
04 28 The Acid Room
05 3D The Sea Cavern
06 12 Within the Long Barrow
07 2B The Hall of the Black Knight
Bit Room ID Room Name
00 29 The Treasury
01 13 At the Edge of the Sea
02 N/A N/A
03 N/A N/A
04 N/A N/A
05 N/A N/A
06 N/A N/A
07 N/A N/A
HandlerDisplayRoomImage tests and sets the bit for the current room. The bit number is the room's place in Table_RoomsWithImages.
AE88 1
Flags: Turn-Based Event States
Holds a single byte, where each bit relates to a turn-based event as follows:
Bit Relating To
00 Unused
01 Unused
02 Unused
03 Unused
04 Unused
05 Unused
06 Unused
07 Unused
When the bit is set, this starts a turn counter (see Counter_Unused_0). GameEventsProcessor decrements the matching counter in Counter_Unused_0 and, when a counter reaches zero, would call through Pointer_TurnBasedEvents_Jump. The shipped image leaves Pointer_TurnBasedEvents_Jump as 00 and never sets these bits.
AE89 8
Turn-Based Event Counters
One countdown per bit of *Flag_TurnBasedEventState. GameEventsProcessor decrements a set counter each turn. The shipped image never arms any of them.
AE91 1
Flag: Following Heroes
Each set bit makes the matching item in Table_FollowingItems follow the player when the room changes (MovePlayerToRoom). Bits 0-3 default to "Beren,the King." (Beren), "Istar,the wizard." (Istar), "Haldir,the minstrel." (Haldir) and "Khadim,the dwarf." (Khadim). Bits 4-7 are never set. ChangeRoom also reads this byte when checking the ruined cottage.
AE92 8
Table: Following Items
Each bit of *Flag_FollowingHeroes makes the item at the same position here follow the player when the room changes.
AE9A 1
Number Of Items In The Players Inventory
The number of items the player is currently holding.
AE9B 50
Load/ Save Buffer
Save Game copies the configurable-exit bytes here before writing the tape block. The buffer is 32 bytes, ending at the current room.
AECD 1
Current Room ID
The room the player starts the game in is room 03: In the Field.
AECE 2
Score
BCD score. Add To Score accumulates into this word.
AED0 2
Pointer: Vocabulary Table
Pointer to the table containing the game vocabulary.
AED2 2
Pointer: Turn-Based Events Jump Table
Pointer to the jump table containing turn-based events. The initial image stores 00.
AED4 2
Pointer: Room Map Table
Pointer to the table containing the relationships between rooms.
AED6 2
Pointer: Item Description Table
Pointer to the table containing item descriptions.
AED8 2
Pointer: Rooms With Images Table
Pointer to the table containing all the rooms which have an image to display.
AEDA 2
Pointer: Room Image Jump Table
Pointer to the jump table for displaying an image relating to a room.
AEDC 2
Pointer: Room Description Table
Pointer to the table containing room descriptions.
AEDE 2
Pointer: Item Grouping Table
Pointer to the table containing item groupings.
AEE0 2
Pointer: Object Noun Phrases
Pointer to the object noun-phrase table.
AEE2 2
Pointer: Object List Table
Pointer to the object-word table.
AEE4 2
Pointer: Verbs Jump Table
Pointer to the jump table of verb handlers.
AEE6 2
Pointer: Configurable Exits Table
Pointer to the configurable-exit address table.
AEE8 2
Pointer: Scenic Events Jump Table
Pointer to the jump table of scenic-event handlers. The initial image stores 00; this game ships with no scenic-event handlers.
AEEA 2
Pointer: Verb Word Tokens Table
Pointer to the verb word-token table.
AEEC 2
Pointer: Spare
Unused pointer. The initial image stores 00.
AEEE 2
Pointer: Spare 2
Unused pointer. The initial image stores 00.
AEF0 2
Number Of Items
The total number of items in the game.
AEF2 2
Number Of Objects
The total number of objects in the game.
AEF4 2
Number Of Verb Tokens
The total number of verb word tokens the game has.
AEF6 2
Number Of Rooms With Images
The total number of rooms which have related images in the game. 0A room slots have a picture; the oil room and the acid room share one.
AEF8 2
Number Of Scenic Events
The total number of scenic events in the game. The initial image stores 00.
AEFA 2
Number Of "Configurable Exits"
The total number of configurable exits in the game.
AEFC 50
Command Buffer
The line the player is typing. The input handler clears all 32 bytes.
AF2E 10
User Input: Word Tokens
AF38 1
Line Number
The entry point writes 18 here.
AF39 4
Four Letter Buffer
The four-character word UserInput_Enter is matching. The routine fills it with ASCII spaces (20) and then copies up to 04 characters of the next command word into it.
AF3D 8
Graphics: Room Image Row
Eight bytes assembled by PrintRoomGraphic for one character row of a room image, then passed to the ROM print routine.
AF45 2
Temporary Storage Table Pointer
AF47 2
Temporary Storage Table Index
AF49 2
Temporary Storage Word Count
CD58 270
Table: Item Descriptions
One word per item. Each entry points at an FF-terminated name.
CE66 132
Table: Room Descriptions
One word per room. Rooms 00 and 01 are unused. The rest point at the room text.
CEEA 144
Table: Object Noun Phrases
One word per object. Each entry points at the noun text.
E4B8 72
Table: Object Words
The vocabulary number (Table_Vocabulary) of each of the 48 objects the player can name (the count is at Count_Objects). The position of a word in this list is its object number, which also indexes Table_ItemGrouping for the items it may mean.
Reached through Pointer_ObjectList: ParserCountItemReferences counts the object words in a command, and ParserProcessItem looks each named object up here.
E500 211
Table: Item Groups
For each object in Table_ObjectNounPhrases, in the same order: the items it may refer to, ending with FF. The pointers at Table_ItemGrouping say where each group starts.
E5D3 36
Table: Verb Word Tokens
The vocabulary number (Table_Vocabulary) of each of the 24 verbs (the count is at Count_VerbTokens). Handler_DispatchVerb looks the first word of a command up here (through Pointer_VerbWordTokens) and jumps to the action at the same position in JumpTable_Verbs.
E687 351
Table: Phrase Tokens
The words an action expects after its verb, as vocabulary numbers (Table_Vocabulary). FD separates alternative wordings and FE ends a phrase. An action points HL at a phrase and calls MatchPhraseTokens. That compares it with the words after the verb and sets the zero flag when one of the wordings matches the whole of the rest of the command.
E7E6 396
Table: Room Map
Six bytes per room, in the order north, south, east, west, up, down. A zero means there is no exit.
EA9D 1
Table: Items Which Are Plural
All the items in the game which are plural; used by Take_AlreadyCarrying_CheckPlural.
FBDC 135
Table: Item Locations
Starting places for the items. GameStart copies this table to Table_ItemLocations at the start of every game.
FCDC 1
Flags: Room Change
Copied to Flags_RoomChange.
FCDD 1
Flag: Beach Dug
Copied to Flag_BeachDug. Bit 0 is clear until the beach in room 3C is dug.
FCDE 1
Flag: Turn Scratch
Copied to Flag_TurnScratch. Cleared at the start of every pass round the game loop.
FCDF 1
Room: Pour Return
Copied to Room_PourReturn. Holds the room ID to restore after pouring.
FCE4 2
Table: Already Seen Room Images
Copied to Table_RoomImagesAlreadySeen. No room picture has been shown yet.
FCEE 1
Flags: Turn-Based Event States
Copied to Flag_TurnBasedEventState. No turn-based event has started.
FCEF 8
Turn-Based Event Counters
Copied to Counter_Unused_0. One countdown per bit of *Flag_TurnBasedEventState.
FCF7 1
Flag: Following Heroes
Copied to Flag_FollowingHeroes. No following bits are set at the start of a game.
FCF8 8
Table: Following Items
Copied to Table_FollowingItems. Default item IDs for bits 0-3: "Beren,the King.", "Istar,the wizard.", "Haldir,the minstrel." and "Khadim,the dwarf.".
FD00 1
Number Of Items In The Players Inventory
Copied to Count_InventoryItems. The player starts holding 00 item(s).
FD01 50
Load/ Save Buffer
Copied to LoadSaveBuffer. Initial bytes for the configurable-exit save area.
FD33 1
Current Room ID
Copied to CurrentRoom. The player starts in room 03: In the Field.
FD34 2
Score
Copied to Score. BCD score starts at 00.
FD36 2
Pointer: Vocabulary Table
Copied to Pointer_Vocabulary. Points at the vocabulary table.
FD38 2
Pointer: Turn-Based Events Jump Table
Copied to Pointer_TurnBasedEvents_Jump. Initial image stores 00.
FD3A 2
Pointer: Room Map Table
Copied to Pointer_RoomMap.
FD3C 2
Pointer: Item Description Table
FD3E 2
Pointer: Rooms With Images Table
FD40 2
Pointer: Room Image Jump Table
Copied to Pointer_RoomImage.
FD42 2
Pointer: Room Description Table
FD44 2
Pointer: Item Grouping Table
FD46 2
Pointer: Object Noun Phrases
FD48 2
Pointer: Object List Table
Copied to Pointer_ObjectList.
FD4A 2
Pointer: Verbs Jump Table
FD4C 2
Pointer: Configurable Exits Table
FD4E 2
Pointer: Scenic Events Jump Table
Copied to Pointer_JumpTable_ScenicEvents. Initial image stores 00.
FD50 2
Pointer: Verb Word Tokens Table
FD52 2
Pointer: Spare
Copied to Pointer_Spare. Unused; initial image stores 00.
FD54 2
Pointer: Spare 2
Copied to Pointer_Spare2. Unused; initial image stores 00.
FD56 2
Number Of Items
Copied to Count_Items.
FD58 2
Number Of Objects
Copied to Count_Objects.
FD5A 2
Number Of Verb Tokens
Copied to Count_VerbTokens.
FD5C 2
Number Of Rooms With Images
FD5E 2
Number Of Scenic Events
Copied to Count_ScenicEvents. Initial image stores 00.
FD60 2
Number Of "Configurable Exits"
FDEB 20
Jump Table: Room Images
FDFF 11
Table: Rooms With Images
The 0A rooms that have a picture (the count is at Count_RoomsWithImages). HandlerDisplayRoomImage looks the current room up here (through Pointer_RoomsWithImages); where it is found picks the drawing routine in JumpTable_RoomImages and the "already seen" bit in Table_RoomImagesAlreadySeen. A picture is shown the first time the player enters the room, and again whenever they type LOOK. An 00 end marker follows the list.