Sherlock: annotated disassembly

Routines

Prev: B5D3 Up: Map Next: B6D6
B6AE: No indirect object: DON'T BE SILLY, or YOU CANNOT ... THE ...
The second-slot counterpart of B65F, handed out by B303. If the slot wants a number (requirement codes 5 and 6) or holds one, prints 'DON'T BE SILLY.' (B671, 6855). Otherwise, if the slot has words, checks them against the room's scenery (B6F0) and then asks the question at B68C.
Input
$A010 The indirect object's requirement code
Output
A message printed ($A59F)
B6AE LD A,($A010) Read $A010 in "Game variables" into A - Indirect object requirement 5 or 6 (a number): YOU CANNOT ... (B671)
B6B1 CP $05 Compare A with $05
B6B3 JR Z,$B671 If A equals $05, go back to B671
B6B5 CP $06 Compare A with $06
B6B7 JR Z,$B671 If A equals $06, go back to B671
B6B9 LD A,($B179) Read $B179 in "Parser variables" into A - The indirect object slot's first word ($B179): bit 7 set (a number): the same
B6BC BIT 7,A Test bit 7 of A
B6BE JR NZ,$B671 If bit 7 of A is set, go back to B671
B6C0 LD HL,$B16E Point HL at $B16E in "Parser variables" - Count in $B16E: bit 0 set means a noun was typed
B6C3 BIT 0,(HL) Test bit 0 of the byte at $B16E in "Parser variables"
B6C5 LD HL,$B178 Point HL at $B178 in "Parser variables"
B6C8 CALL NZ,$B6F0 Then copy the name words at $B178 for the message (B6F0)
B6CB CALL $B62F Print the start of the message (B62F)
B6CE LD A,($B16E) Read $B16E in "Parser variables" into A - Finish it using the indirect slot
B6D1 LD HL,$B178 Point HL at $B178 in "Parser variables"
B6D4 JR $B68C Go back to B68C
Prev: B5D3 Up: Map Next: B6D6