Sherlock: annotated disassembly

Routines

Prev: C9BF Up: Map Next: CA76
CA60: Run the action body, then report what the player saw
Clears CAAE, runs the body through the dispatcher (CB2C), then CA7F (the player's own view changed?) and, unless the body set CAAE, CAAF (someone came into the player's room?).
Output
HL, AF The result of the action's body
CA60 XOR A Clear A to zero (and the carry flag) - CAAE = 0 (see EXAMINE: set to 1 when the action itself prints what is seen)
CA61 LD ($CAAE),A Store A in "Flag: the player's view has changed" (CAAE)
CA64 CALL $CB2C Call the routine "Dispatch to a handler routine via a computed jump" (CB2C) - Run the action's body (CB2C), keeping its result
CA67 PUSH AF Save AF on the stack
CA68 PUSH HL Save HL on the stack
CA69 CALL $CA7F Has the player's view changed? Describe the room if so (CA7F)
CA6C LD A,($CAAE) Read "Flag: the player's view has changed" (CAAE) into A - Unless the action printed its own report (CAAE) ...
CA6F AND A Test A for zero (this leaves A as it was and clears carry)
CA70 CALL Z,$CAAF If A is zero, call the routine "Announce a character coming into the player's room" (CAAF) - ...give the standard report (CAAF)
CA73 POP HL Restore HL from the stack
CA74 POP AF Restore AF from the stack
CA75 RET Return to the caller
Prev: C9BF Up: Map Next: CA76