Sherlock: annotated disassembly

Routines

Prev: 9A80 Up: Map Next: 9ACB
9A99: Shared action 1: the police cab, GO TO (Leatherhead routes, $9AA3)
Addresses named in the title: 9AA3.
Header $04 $00 then code. 9AA3 knows the police cab's only three routes, from the room it is in (A00A) to the direct object: Old Mill Road to Main Street (L = 112), Main Street to Old Mill Road (114) and Main Street to Kings Cross Road (94); anything else refuses (DC15). L becomes the journey's length ($A01F, at 9B04), the vehicle to move is the police cab (thing 109 = $6D, put in E2C6), and the ride ends at 9B20 by handing back the vehicle sub-script F3AD.
Told SAY TO POLICE MAN "GO TO KINGS CROSS ROAD" in Leatherhead's Main Street at 5:07pm, the police cab - with Lestrade and Watson aboard - reached Kings Cross Road at 6:42, 95 minutes. Asked for Buckingham Palace Road it did nothing.
Input
IX The action record
Output
F Z when the route is refused; otherwise continues at $9AD7
9A99 INC B Add one to B - Header $04 $00
9A9A NOP Do nothing (padding)
9A9B CALL $9AA3 Call 9AA3 (inside "Shared action 1: the police cab, GO TO...") - Is this one of the police cab's routes? No: refuse
9A9E JP Z,$DC15 If the zero flag is set, jump on to the routine "Fail: A = 0, HL = 0, Z set" (DC15)
9AA1 JR $9AD7 Jump on to 9AD7
This entry point is used by the routine at 9ACB.
9AA3 LD A,($A00A) Read the current actor's room (A00A) into A - From Old Mill Road (room 103)...
9AA6 CP $67 Compare A with $67
9AA8 JR NZ,$9AB5 If A differs from $67, skip ahead to 9AB5
9AAA LD A,($A034) Read $A034 in "Game variables" into A - ...to Main Street (50): 112 minutes
9AAD CP $32 Compare A with $32
9AAF LD L,$70 Load L with $70
9AB1 JR Z,$9AC8 If A equals $32, skip ahead to 9AC8
9AB3 XOR A Set A to zero, which sets the zero flag for the caller
9AB4 RET Return to the caller
9AB5 CP $32 Compare A with $32 - From Main Street (50)...
9AB7 JR NZ,$9AB3 If A differs from $32, go back to 9AB3
9AB9 LD A,($A034) Read $A034 in "Game variables" into A - ...to Old Mill Road (103): 114 minutes,
9ABC CP $67 Compare A with $67
9ABE LD L,$72 Load L with $72
9AC0 JR Z,$9AC8 If A equals $67, skip ahead to 9AC8
9AC2 CP $12 Compare A with $12 - or to Kings Cross Road (18): 94 minutes
9AC4 JR NZ,$9AB3 If A differs from $12, go back to 9AB3
9AC6 LD L,$5E Load L with $5E
9AC8 OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller - NZ: a route, L = its minutes
9ACA RET Return to the caller
Prev: 9A80 Up: Map Next: 9ACB