Sherlock: annotated disassembly

Data

Page Byte Address Description
93 128 5D80
Dictionary index: where each letter's words start
93 192 5DC0
The dictionary: 592 words
130 89 8259
Verb patterns: the verb number is the position in this table
132 11 840B
Room table: room number -> room record
132 225 84E1
Room records (rooms 0-105)
139 111 8B6F
Entity index: id -> record address
140 186 8CBA
Entity records: every person, object and door
149 112 9570
The node heap: 752 bytes for the engine's linked lists
152 96 9860
The actor table: who acts, and where each is in its plan script
153 33 9921
Plan script: you (actor 0) - read, parse and do the player's commands
153 77 994D
The case's relation words
153 101 9965
The case: statements about the crime, and the evidence each needs
154 125 9A7D
Three bytes ($FF, 0, 0) referenced from $BD4D
155 127 9B7F
Cab journeys: which cab stands a hansom cab runs between, and how long it takes
156 133 9C85
After-turn routines for nine characters
157 16 9D10
Watson's greeting countdowns: the player, Lestrade, Straker
157 46 9D2E
Straker's greeting countdowns: the player, Watson
157 69 9D45
A police man's warning countdowns: the player, Watson, the Major
157 112 9D70
The other police man's warning countdowns
157 144 9D90
Lestrade's flags
158 192 9EC0
Strachan's after-turn state
158 202 9ECA
The cook's after-turn state
158 208 9ED0
The gardener's after-turn state
159 56 9F38
Each verb's default action record
159 171 9FAB
Verbs 128-140: the verbs only plan scripts use
159 214 9FD6
Game variables
161 26 A11A
$A11C: the free-list link before the best block so far
162 77 A24D
Articles: A / AN / SOME, or THE
162 170 A2AA
Use THE: a flag for the article printer ($A7F2)
163 93 A35D
A remembered command: verb, direct object, indirect object
165 93 A55D
Routines for the message control codes $00-$1F
165 157 A59D
Where the message's stack parameters end
166 209 A6D1
Code $0A: the count, then the choice
167 234 A7EA
$A7D0: set when the word was not YOU
168 81 A851
Code $1B: the all-capitals flag (read at $AA59)
168 92 A85C
Word suffixes
169 181 A9B5
Word buffer pointer for $A9B7
170 113 AA71
Shared action records, used through objects' own action lists
175 107 AF6B
Special words and their handlers
177 109 B16D
Parser variables
179 156 B39C
$B39D: bit 7 of the verb's first word reference
180 162 B4A2
$B4C1: $FF until the number in the direct-object slot has been used
181 73 B549
$B568: $FF until the number in the indirect-object slot has been used
182 214 B6D6
$B6FD's working pointers
183 126 B77E
$B6FD's flag
184 102 B866
Speech hand-over variables
185 52 B934
The actor an order is for (two copies)
186 19 BA13
Variables used by the code at $BA20-$BF58
186 96 BA60
More variables for $BA67-$BB5C
192 254 C0FE
The saved game's tape header: a CODE file 'SHD V2.0'
193 40 C128
Flag: text lines are narrow (a picture is showing)
193 144 C190
The chain strip that holds the clock: a 32-pixel pattern, six lines deep
193 244 C1F4
Command-window state
196 113 C471
Words for a +5 flag that should be set but is not
196 129 C481
Words for a +5 flag that is set but should not be
196 145 C491
Rooms saved before an action
202 174 CAAE
Flag: the player's view has changed
203 40 CB28
The saved IX and IY for $CB2C's calls
203 121 CB79
The flags $CB7B is to name
204 11 CC0B
Bytes for the actor's turn ($CC37)
208 90 D05A
How a room is entered in words: 'You are ON Baker Street'
208 106 D06A
Direction words, continued: WEST to DOWN
208 220 D0DC
Set to use 'YOU CAN SEE' instead of 'YOU ARE ...'
213 201 D5C9
Where a thing is: IN, ON, BEHIND, UNDER, TIED
214 184 D6B8
A flag of the player's script step, and spare bytes
215 20 D714
Flag: repeat the last command ('@')
215 224 D7E0
A flag for $D7E1
216 151 D897
The line editor's inside-quotes flag
217 195 D9C3
The tokenizer's current dictionary candidate
218 50 DA32
The tokenizer's word pointer
219 100 DB64
Pounds, shillings and pence
220 19 DC13
The number reader's working bytes
221 82 DD52
Sub-script: RUN at $E460; RUN at $E7BE; default for verb 18 (ENTER); default for verb 27 (GO INTO)
223 126 DF7E
Sub-script: shared action 20, TAKE the burning note
223 167 DFA7
Sub-script: shared action 21, OPEN a wall safe
224 141 E08D
Sub-script: shared action 13, GO TO in a cab
224 160 E0A0
Sub-script: shared action 16, EXAMINE CLOSELY the deep stream
224 224 E0E0
Sub-script: shared action 19, EXAMINE CLOSELY the trash pile
224 242 E0F2
Sub-script: shared action 17, EXAMINE CLOSELY the drawer
225 123 E17B
Sub-script: shared 22 (no object uses it)
225 163 E1A3
Sub-script: shared 3 (no object uses it)
226 42 E22A
A table searched by $E207 (part of TELL)
226 198 E2C6
HAIL: the cab hailed, plus one
228 82 E452
Sub-script: default for verb 21 (FOLLOW); default for verb 22 (COME WITH)
229 6 E506
Sub-script: pay the cab fare
231 47 E72F
Plan script: watson (actor 3)
231 154 E79A
Sub-script: RUN at $E737; RUN at $E74A; RUN at $E776
231 231 E7E7
Plan script: inspector lestrade (actor 2)
235 40 EB28
Sub-script: RUN at $E939; RUN at $EA0A; RUN at $EA95
235 71 EB47
Sub-script: RUN at $E8B1; RUN at $E9FD
235 114 EB72
Sub-script: Inspector Lestrade's journey to Leatherhead
235 139 EB8B
Sub-script: internal verb 134 (sub-script: FOLLOW the direct object until in room (indirect object))
235 155 EB9B
Sub-script: internal verb 137 (sub-script: do verb (direct object), then EXAMINE the indirect object)
235 164 EBA4
Sub-script: take a hansom cab to room (indirect object)
235 225 EBE1
Sub-script: take a steam train to room (direct object)
235 250 EBFA
Plan script: chief constable straker (actor 4)
236 246 ECF6
Sub-script: RUN at $E997; RUN at $EC12
236 255 ECFF
Sub-script: RUN at $F149
237 12 ED0C
Sub-script: RUN at $E9DB; RUN at $EC29; RUN at $F150
237 23 ED17
Sub-script: RUN at $E8C9; RUN at $E9E4; RUN at $EC64; RUN at $F11C
237 40 ED28
Sub-script: RUN at $EDEB; RUN at $EE0E; internal verb 135 (sub-script: OPEN, GO THROUGH and CLOSE a door)
237 75 ED4B
Plan script: gardener (actor 8)
237 221 EDDD
Sub-script: internal verb 139 (sub-script: do verb (direct object), then CHANCE (indirect object))
237 233 EDE9
Sub-script: internal verb 138 (sub-script: go through a door (135), then CHANCE (indirect object))
237 248 EDF8
Plan script: cook (actor 9)
238 31 EE1F
Plan script: maid (actor 10)
238 43 EE2B
Plan script: Basil Phipps (actor 6) - the spy with the plans
239 246 EFF6
Plan script: the German agent (actor 104) - Phipps's buyer
240 23 F017
Plan script: strachan (actor 5)
240 98 F062
Plan script: major percival ffoulkes (actor 7)
241 16 F110
Plan script: local police man (actor 11)
241 69 F145
Plan script: local police man (actor 12)
241 90 F15A
Plan script: tricia fender (actor 13)
242 29 F21D
Plan script: steam train (actor 36)
242 45 F22D
Plan script: steam train (actor 38)
242 58 F23A
Plan script: steam train (actor 37)
242 70 F246
Plan script: steam train (actor 39)
242 91 F25B
Plan script: steam train (actor 41)
242 104 F268
Plan script: steam train (actor 40)
242 120 F278
Plan script: steam train (actor 42) - the Leatherhead line, first stop Kings Cross
242 141 F28D
Plan script: steam train (actor 43) - the Leatherhead line, first stop Leatherhead
242 165 F2A5
Sub-script: internal verb 140 (sub-script: $E4C9 on the direct object, then WAIT (indirect object) minutes)
242 178 F2B2
Plan script: cabbie (actor 31); cabbie (actor 34)
243 128 F380
Sub-script: RUN at $F37A
243 162 F3A2
Plan script: returned as a sub-script by $9B20
244 142 F48E
Fill state
246 11 F60B
Fill pattern for the picture interpreter
246 12 F60C
Which rooms have a picture
246 56 F638
Picture: room 12 (slater street)
246 237 F6ED
Picture: room 61 (basils bedroom)
247 190 F7BE
Picture: room 95 (small room)
248 104 F868
Picture: room 92 (jones front gate)
249 40 F928
Picture: room 6 (entrance hallway)
249 240 F9F0
Picture: room 62 (browns front gate)
250 170 FAAA
Picture: room 11 (scotland yard)
251 110 FB6E
Picture: room 54 (platform one), room 55 (platform two)
252 58 FC3A
Picture: room 88 (east side)
252 237 FCED
Picture: room 89 (west side)
253 168 FDA8
Picture: room 71 (browns library)
254 130 FE82
Picture: room 74 (daphnes room)
255 71 FF47
Picture: room 5 (baker street)