Page Byte Address Description
96 0 6000
Dictionary letter index
96 64 6040
Main dictionary (the words the player can type)
103 176 67B0
Second dictionary (message words)
107 238 6BEE
Unused
108 0 6C00
Game entry point (RANDOMIZE USR 27648)
108 39 6C27
Start or restart a game
109 10 6D0A
Main command loop
109 195 6DC3
Window separator pattern
109 205 6DCD
Read a line of input from the keyboard
110 70 6E46
Cursor-key shortcuts
110 113 6E71
Repeat the last command
110 130 6E82
Delete the whole input line
110 142 6E8E
Turn the next word of the input into a token
111 39 6F27
Recognise punctuation
111 62 6F3E
Start a dictionary search for the typed word
111 177 6FB1
Compare the typed word with a dictionary word
111 202 6FCA
Clear the screen
111 233 6FE9
Initial prompt and command
111 240 6FF0
Input buffer
112 113 7071
Tokeniser work areas
112 147 7093
Token buffer
112 211 70D3
Registers saved by the message printer
112 217 70D9
Clear a block of memory
112 223 70DF
Get the address of an action table entry
112 234 70EA
Collect the flag nibbles of an action table entry
113 17 7111
Report the action (if not inside a quotation)
113 34 7122
Report the action ("you attack thorin with the sword.")
113 204 71CC
Get the address of a room's word list
113 217 71D9
Get the address of an object's word list
113 234 71EA
Match a command against an action table entry
114 37 7225
Compare two word references
114 64 7240
Wait for a key, typing WAIT if the player is idle
114 130 7282
Compare HL with DE
114 136 7288
The WAIT command
114 140 728C
Message interpreter control-code jump table
114 186 72BA
Print a character from a message
114 197 72C5
Print "I cannot do that."
114 202 72CA
Print a message, suppressing actions inside a quotation
114 212 72D4
Print a message (message bytecode interpreter)
115 55 7337
Message code $14: end with a new line
115 59 733B
Message code $15: end with a full stop
115 63 733F
Print the last word of a message and finish
115 94 735E
Message code $00: print an object passed on the stack
115 109 736D
Message code $01: print a word passed on the stack
115 117 7375
Message code $02: relative jump
115 132 7384
Message code $03: print the instrument's noun
115 139 738B
Message code $04: print a word with an article
115 154 739A
Message code $06: print the actor's name
115 166 73A6
Message code $07: print the target
115 180 73B4
Message codes $08 and $09
115 190 73BE
Print the instrument
115 215 73D7
Message code $0B: call a sub-message
115 240 73F0
Message code $0C: HIS or YOUR (actor)
115 254 73FE
Message code $0E: HIS or YOUR (target)
116 3 7403
Message code $10: "you are" or "thorin is"
116 28 741C
Message code $11: target's name and IS/ARE
116 36 7424
Message code $13: pushed object's name and IS/ARE
116 43 742B
Print an object's name from its word list
116 54 7436
Print the article for a word
116 111 746F
Print a word, with an article if required
116 127 747F
Print the name of object A
116 138 748A
Print an abbreviated word
116 157 749D
Word buffer
116 177 74B1
Print a word from a list
116 184 74B8
Print a dictionary word
117 107 756B
Is output enabled?
117 120 7578
Print a newline
117 128 7580
Print a character
117 168 75A8
Unused
117 172 75AC
Print a character in the input window (entry from 7580)
117 173 75AD
Print a character in the lower (input) window
118 0 7600
Scroll the input window up
118 61 763D
Scroll the input window down
118 109 766D
Print a character using the ROM font
118 142 768E
Unused
118 148 7694
Put a character on the screen
119 84 7754
Move back one character position
119 94 775E
Scroll the story window up
119 188 77BC
Draw a character glyph
120 21 7815
Font
123 21 7B15
Copy a line of text to the ZX Printer
123 107 7B6B
Short delay
123 116 7B74
Keyboard scan state
123 134 7B86
Read a key
123 238 7BEE
Keyboard table
124 22 7C16
Keyboard table (SYMBOL SHIFT)
124 62 7C3E
Parser work area
124 79 7C4F
Parse the command
124 156 7C9C
Parser jump table
124 182 7CB6
Is the parser inside a quotation (set Z)?
124 187 7CBB
Is the parser inside a quotation?
124 192 7CC0
Parser: end of line (and THEN / full stop)
125 182 7DB6
Parser: a direction
125 213 7DD5
Parser: AND
125 249 7DF9
Parser: GO or RUN
125 251 7DFB
Parser: a verb
126 90 7E5A
Parser: an article
126 95 7E5F
Parser: IN or INTO
126 108 7E6C
Parser: a noun phrase
126 211 7ED3
Parser: store an adjective
126 230 7EE6
Parser: store a preposition
126 245 7EF5
Parser: store a noun phrase in the frame
127 34 7F22
Parser: move on to the next frame
127 41 7F29
Parser: clear the ALL state
127 46 7F2E
Parser: clear the current frame
127 61 7F3D
Parser: fetch the next token
127 86 7F56
Parser: step back to the previous frame
127 92 7F5C
Parser: step on to the next frame
127 105 7F69
Find the next frame (24 bytes lower)
127 111 7F6F
Find the previous frame (24 bytes higher)
127 129 7F81
Parser: give a frame the previous frame's verb
127 197 7FC5
Copy part of one frame to another
127 222 7FDE
Parser: store the verb
127 238 7FEE
Parser: syntax error
127 249 7FF9
Print "what?"
128 7 8007
Unused
128 9 8009
Parser: special words
128 41 8029
Special words
128 93 805D
PRINT and NOPRINT
128 107 806B
Special word finished: carry on parsing
128 114 8072
EXCEPT
128 138 808A
ALL
128 154 809A
IT
128 175 80AF
Store the noun phrase in the frame (jump)
128 181 80B5
Opening quotation mark
128 205 80CD
Quotation mark
129 73 8149
QUIT
129 88 8158
HELP
129 133 8185
Help messages
129 167 81A7
SCORE
129 173 81AD
Print the score
129 230 81E6
Divide by repeated subtraction
129 242 81F2
PAUSE
130 9 8209
LOAD
130 80 8250
Load a block, or restart on a tape error
130 107 826B
Copy three bytes
130 113 8271
Wait for a key press and release
130 132 8284
SAVE
131 18 8312
Verify a block
131 46 832E
Command execution work area
131 81 8351
Execute a command and run the turn
131 154 839A
Clear the command execution work area
131 167 83A7
Find the action and objects for a command
132 5 8405
Search for a target and an instrument
132 100 8464
ALL: find the next object
132 146 8492
Start the search for targets
132 171 84AB
Start the search for instruments
132 189 84BD
Choose the object table to search
132 201 84C9
Does the action need an instrument?
132 222 84DE
Try the action (dry run)
132 230 84E6
Would this action work? (for a character)
133 84 8554
Copy an object's or a room's words
133 105 8569
Decode the flags of the action
133 143 858F
Find the action for a command
134 20 8614
Assign the noun phrases to target and instrument
134 157 869D
Pick up a preposition from the frame
134 186 86BA
Call the routine at IY
134 188 86BC
Find the next candidate target
134 237 86ED
Find the next candidate target for which the action works
135 8 8708
Find the next candidate instrument
135 69 8745
Find the next candidate instrument for which the action works
135 92 875C
Prepare to reply to the player
135 101 8765
Leave the command unfinished
135 116 8774
Ask "which ...?"
135 129 8781
Print a reply and give up
135 137 8789
Decide about the instrument
135 173 87AD
Report why the objects could not be decided
136 62 883E
Report a missing or unsuitable instrument
136 101 8865
Push the words of the action for a question (instrument)
136 105 8869
Push the words of the action for a question
136 149 8895
"I do not know the verb ..."
136 167 88A7
Address the orders to a character
136 236 88EC
Find an order for the current actor
136 253 88FD
Does the actor have an order waiting?
137 7 8907
Obey an order
137 77 894D
Cancel a character's orders
137 100 8964
Unused
137 101 8965
Draw the picture of a room, if it has one
137 133 8985
Draw a picture
138 77 8A4D
Unused
138 79 8A4F
Flood fill
138 204 8ACC
Test a pixel
138 211 8AD3
Move an attribute address up a row
138 228 8AE4
Move an attribute address down a row
138 245 8AF5
Move an attribute address left
138 255 8AFF
Move an attribute address right
139 9 8B09
Move the drawing position up
139 24 8B18
Move the drawing position down
139 31 8B1F
Move the drawing position right
139 38 8B26
Move the drawing position left
139 47 8B2F
Draw a line
139 147 8B93
Plot a pixel
139 188 8BBC
Get the screen address of a pixel
139 233 8BE9
Start a picture: clear the picture area
140 44 8C2C
Drawing colour
140 45 8C2D
LOOK
140 58 8C3A
Is the actor carrying the target?
140 69 8C45
DROP
140 117 8C75
TAKE OUT OF
140 134 8C86
Can the actor lift the target?
140 200 8CC8
TAKE and CARRY
140 234 8CEA
Points for visiting rooms
141 21 8D15
Move variables
141 25 8D19
Move an actor (GO north, EAST, etc.)
142 52 8E34
Is an object shut inside something?
142 78 8E4E
LOOK THROUGH (a door or window)
142 90 8E5A
LOOK ACROSS (a river)
142 157 8E9D
GO THROUGH (a door, window or river)
142 160 8EA0
Go through an exit
142 211 8ED3
FILL WITH
143 23 8F17
RUN
143 55 8F37
ENTER and GO INTO
143 64 8F40
FOLLOW
143 95 8F5F
THROW AT
143 158 8F9E
TALK TO and SAY TO
143 207 8FCF
DIG (the sand)
143 224 8FE0
SHOOT
144 60 903C
The player is dead
144 85 9055
INVENTORY
144 120 9078
OPEN
144 162 90A2
CLOSE
144 180 90B4
Check that a target may be attacked (sides)
144 219 90DB
Attack (HIT, KILL, ATTACK, STRIKE, SMASH ...)
145 125 917D
Randomise a fight value
145 144 9190
Wound messages
145 176 91B0
Is the target an ordinary object?
145 185 91B9
PUT IN, PUT ON and DROP IN
146 6 9206
EAT and DRINK
146 82 9252
"The X is broken"
146 87 9257
STRIKE (break something)
147 8 9308
GIVE TO
147 68 9344
EXAMINE
147 110 936E
EMPTY
147 146 9392
PUT or DROP something in the river
147 205 93CD
LOCK
147 237 93ED
UNLOCK
148 4 9404
THROW ... ACROSS / THROUGH
148 54 9436
Could the action apply to this target?
148 111 946F
Carry out the action
149 63 953F
Let a character react to what was done to it
149 77 954D
Is it too dark for Bilbo to see?
149 137 9589
Describe the room through a door
149 142 958E
Describe a room
149 185 95B9
Describe a room (continued)
149 228 95E4
Print a room's name or description
149 248 95F8
Wait for a key after a picture
150 6 9606
Describe a room briefly
150 17 9611
End of turn: run the timers
150 134 9686
Is the object within the player's reach?
150 218 96DA
Kill the target
150 221 96DD
Kill a character
151 11 970B
Choose the random features of a new game
151 82 9752
Print a message and end the sentence
151 93 975D
Is the action really happening?
151 105 9769
Unused
151 108 976C
Let the other characters act
152 115 9873
Advance a character's program pointer
152 131 9883
Character instruction: do an action
152 207 98CF
Character instruction: action without objects
153 33 9921
A character tries an action
153 180 99B4
Choose a behaviour at random
153 224 99E0
Find a character's table entry
153 251 99FB
Change a character's behaviour
154 40 9A28
Report that a character has arrived
154 93 9A5D
Prepare for the characters' turn
154 113 9A71
A character tries to get out of something
154 159 9A9F
Is the action sensible?
154 199 9AC7
Call the routine at HL (if HL is not 0)
154 219 9ADB
Jump to HL
154 220 9ADC
Find an object's handler for an action
154 238 9AEE
Get the next entry of a 3-byte table
155 4 9B04
Get the next object
155 12 9B0C
Get the address of a room record
155 37 9B25
Get the address of an object record
155 55 9B37
Bilbo-moved flag
155 56 9B38
Move an object and everything it holds
155 108 9B6C
Move the contents of an object
155 150 9B96
How much room is left in a room?
155 205 9BCD
Is the actor holding the target?
155 223 9BDF
Is object A inside the holder at (HL)?
155 244 9BF4
Random number from 0 to A
155 253 9BFD
Random number in a range
156 61 9C3D
Total size of an object's contents
156 66 9C42
Total weight of an object's contents
156 85 9C55
Add up the contents of an object
156 140 9C8C
Get the actor's room record
156 153 9C99
Check for a dry run
156 165 9CA5
Drop everything the target holds
156 168 9CA8
Drop everything an object holds
156 236 9CEC
Count the visible things an object holds
157 18 9D12
Search a table of 3-byte entries
157 46 9D2E
Find the next object that fits some words
157 119 9D77
Can the object at IY be seen from IX?
157 134 9D86
Is the object near the actor?
157 146 9D92
Are two objects in the same place?
157 200 9DC8
Find the outermost holder
157 222 9DDE
Get the actor's room's exits
157 233 9DE9
Find the next room that fits some words
158 16 9E10
Print an object's name
158 31 9E1F
Print a noun with its adjectives
158 81 9E51
Find a usable exit in a direction
158 110 9E6E
Find the exit through the target
158 113 9E71
Find the exit through a given door
158 118 9E76
Find the exit that leads to a room
158 147 9E93
Run a handler with target and instrument swapped
158 191 9EBF
Report failure
158 203 9ECB
Get an object's room
158 221 9EDD
List what can be seen in the room
158 248 9EF8
List the objects held by A in room B
159 16 9F10
List objects, with their contents
159 137 9F89
Print the heading for a list of contents
159 222 9FDE
Get the start of a room's exits
159 234 9FEA
Get the word for a direction
159 248 9FF8
Describe the doors of a room
160 84 A054
Find the next visible exit
160 104 A068
List the visible exits
160 148 A094
"The X is Y" (instrument)
160 156 A09C
"The X is Y"
160 188 A0BC
Mark an object as dead or broken
160 222 A0DE
Look up the holder of an object (unused)
160 248 A0F8
Is the object alive?
161 0 A100
Should the instrument's handlers be used?
161 19 A113
A character speaks
161 41 A129
Is the target locked or open?
161 59 A13B
Action and word tables
161 116 A174
Handler for the water: DRINK
161 120 A178
TIE TO
161 228 A1E4
UNTIE
161 253 A1FD
Handler for the fast river: SWIM
162 50 A232
BURN
162 64 A240
Handler for the fast black river: SWIM
162 88 A258
Handler for the black water: DRINK
162 96 A260
Handler for the side door: UNLOCK
162 100 A264
Handler for the red door: LOCK and UNLOCK
162 104 A268
Handler for the heavy rock door: LOCK and UNLOCK
162 106 A26A
Does this key fit?
162 142 A28E
Handler for the side door: OPEN
162 152 A298
Handler for the crack: OPEN
162 167 A2A7
Handler for the spider web: it has been broken
162 192 A2C0
Handler for the ring: WEAR
162 236 A2EC
Handler for the ring: TAKE OFF
163 22 A316
CAPTURE
163 106 A36A
A dead goblin comes back
163 195 A3C3
Goblin reincarnation table
163 231 A3E7
Handler for the goblins' door: OPEN
164 0 A400
Timer 3 expires: the goblins' door closes
164 6 A406
Character routine: react to being given something
164 28 A41C
Character routine: "what's this?"
164 37 A425
Character routine: small talk
164 67 A443
Character routine: "this was thrains key"
164 76 A44C
Character routine: greet Bilbo
164 93 A45D
Handler for the magic door: OPEN
164 104 A468
CLIMB OUT OF
164 134 A486
CLIMB INTO (the barrel, the chest or the boat)
164 195 A4C3
Is the object open?
164 202 A4CA
Character routine: the warg
164 219 A4DB
Handler for the trap door: the barrel escape
164 244 A4F4
Timer 0: the barrel floats down the river
165 57 A539
Character routine: "where's the thief?"
165 80 A550
Character routine: Thorin
165 119 A577
Handler for the trap door: OPEN and CLOSE
165 145 A591
Character routine: the dragon comes for Bilbo
165 187 A5BB
Character routine: the dragon speaks
165 213 A5D5
Character routine: the dragon wakes
166 0 A600
Unused routine
166 20 A614
Handler for the magic door
166 49 A631
Handler for Thorin: the small curious key shatters
166 85 A655
Handler for the window: OPEN and CLOSE
166 120 A678
Handler for the window
166 158 A69E
Timer 4: sinking into the bog
166 184 A6B8
Handler for the curious map: Elrond reads it
167 8 A708
Handler for the rope: THROW ACROSS (the river)
167 98 A762
Evens
167 106 A76A
Handler for the rope: PULL
167 146 A792
Handler for the boat: it crosses by itself
167 159 A79F
Character routine: Bard remembers his orders
167 198 A7C6
Character routine: Gollum asks his riddle
167 234 A7EA
Character routine: Gollum waits for the answer
168 26 A81A
Character routine: Gollum mutters
168 66 A842
Character routine: a character eats Bilbo
168 101 A865
Character routine: dawn in the trolls' clearing
168 177 A8B1
Character routine: the trolls talk
168 202 A8CA
Has the game been won?
168 217 A8D9
Character routine: Elrond gives Bilbo lunch
169 27 A91B
Handler for the barrel: JUMP ONTO / CLIMB INTO
169 80 A950
Timer 1 expires: the web is mended
169 104 A968
Timer 9 expires: the side door vanishes
169 133 A985
Timer 9 tick: the side door appears
169 150 A996
Handler for the side door: closing it
169 167 A9A7
Timer 5 tick: the magic door opens and an elf sweeps past
169 187 A9BB
Print a message if Bilbo is near the magic door
169 201 A9C9
Timer 5 expires: the magic door closes
169 212 A9D4
Timer 6 expires: the ring comes off
169 237 A9ED
Handler for the wine: Bilbo gets drunk
169 255 A9FF
Timer routine
170 4 AA04
Timer 2 expires: smothered by the spiders
170 19 AA13
Pale bulbous eyes: tick routine
170 46 AA2E
Pale bulbous eyes: expire routine
170 71 AA47
Action table
172 31 AC1F
Articles
172 49 AC31
Abbreviated words
172 113 AC71
Messages and scripts
181 203 B5CB
Game variables
182 15 B60F
Verb endings
182 40 B628
Orders buffer and command frames
184 208 B8D0
Room pointer table
185 112 B970
Room prepositions
185 122 B97A
Room records
191 83 BF53
Object index
192 11 C00B
Object records
198 31 C61F
Default action handlers
198 125 C67D
Room-entry handlers
198 147 C693
Room-entry handler: Beorn's house (room 22) wakes the butler
198 161 C6A1
Room-entry handler: the place of black spiders (room 26) starts timer 2
198 168 C6A8
Room-entry handler: the deep bog (room 29) starts timer 4
198 175 C6AF
Room-entry handler: the Elvenking's cellar (room 32) wakes the dragon and Bard
198 204 C6CC
Room-entry handler: the forest (rooms 2 and 3)
198 217 C6D9
Room-entry handler: the forest river (room 33) - only in a barrel
198 235 C6EB
Gollum's riddles
198 253 C6FD
Hidden routes
199 28 C71C
Character behaviour programs and reaction tables
201 115 C973
Turn timers
201 186 C9BA
Character table
202 50 CA32
Unused
204 0 CC00
Location picture index
204 67 CC43
Picture: room 1 (?)
206 119 CE77
Picture: room 49 (?)
207 178 CFB2
Picture: room 6 (?)
210 78 D24E
Picture: room 11 (?)
211 103 D367
Picture: room 37 (?)
213 181 D5B5
Picture: room 43 (?)
215 19 D713
Picture: room 38 (?)
217 42 D92A
Picture: room 7 (?)
219 168 DBA8
Picture: room 24 (?)
221 121 DD79
Picture: room 35 (?)
224 44 E02C
Picture: room 13 (?)
224 73 E049
Picture: room 31 (?)
225 66 E142
Picture: room 5 (?)
225 159 E19F
Picture: room 28 (?)
227 254 E3FE
Picture: room 4 (?)
228 122 E47A
Picture: room 32 (?)
230 228 E6E4
Picture: room 16 (?)
233 238 E9EE
Picture: room 25 (?)
236 62 EC3E
Picture: room 8 (?)
238 67 EE43
Picture: room 41 (?)
240 1 F001
Picture: room 26 (?)
241 230 F1E6
Picture: room 39 (?)
243 91 F35B
Unused