Sherlock: annotated disassembly

Routines

Prev: DDD0 Up: Map Next: DE9D
DE6F: Action record: default for verb 33 (INVENTORY)
INVENTORY: prints 'You are carrying' and the list of what the actor holds (D4CC, D51A), or 'nothing'. After DROP ALL, 'You are carrying nothing' (the DE86 branch); in the old man's disguise, 'An old man is carrying nothing'.
Input
$A036 The actor
Output
F NZ; "YOU ARE CARRYING" and the list, or NOTHING, printed
DE6F DEFB $20,$10 Action record header: flags $20; bit 5: test D078 first; byte 1 $10
DE71 CALL $A2A2 Call the routine "Print a newline (A kept)" (A2A2)
DE74 LD HL,$68AD Point HL at the message "YOU ARE CARRYING" (68AD)
DE77 CALL $A59F Call the routine "Print the message at HL" (A59F)
DE7A LD A,($A036) Read $A036 in "Game variables" into A
DE7D CALL $D4CC Call the routine "Count the things in place B that should be listed (B)" (D4CC)
DE80 AND A Test A for zero (this leaves A as it was and clears carry)
DE81 LD HL,$6900 Point HL at the message "NOTHING" (6900)
DE84 JR NZ,$DE8C If A is not zero, skip ahead to DE8C
DE86 CALL $A59F Call the routine "Print the message at HL" (A59F)
DE89 OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller
DE8B RET Return to the caller
DE8C LD C,A Copy A into C
DE8D LD A,($A00A) Read the current actor's room (A00A) into A
DE90 LD B,A Copy A into B
DE91 LD A,($A036) Read $A036 in "Game variables" into A
DE94 CALL $D51A Call the routine "List the things in a place, with commas and AND" (D51A)
DE97 CALL $A2A2 Call the routine "Print a newline (A kept)" (A2A2)
DE9A OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller
DE9C RET Return to the caller
Prev: DDD0 Up: Map Next: DE9D