Sherlock: annotated disassembly

Routines

Prev: 9C85 Up: Map Next: 9CCE
9CA2: Phipps's after-turn routine
Once thing $55 (85, the burning note) has been revealed (+5 bit 7), counts down 9CA1; when it reaches 0, the note is described as BURNT (word $015B into its +9/+10), its +$0D/+$0E are cleared, and bit 1 of +3 of the case record at 99B7 is cleared.
With the player waiting outside, the note is revealed at 10:05am, the countdown 9CA1 (15 at the start) falls once a minute and reaches 0 at 10:24am. A plain TAKE of the note runs the shared TAKE script at DF7E, which sets the countdown to $FF (stopped) and renames the note SINGE, so it can be examined and used as evidence; TAKE NOTE FROM FIREPLACE does not run that script and the note still burns away.
Output
F Z until the note has burnt; no registers are returned
9CA2 LD A,$55 Load A with $55 - Thing $55, the burning note
9CA4 CALL $D237 Call the routine "Resolve an id (in A) to its full entity record" (D237)
9CA7 BIT 7,(IX+$05) Test bit 7 of byte +5 of the record at IX - Not yet revealed (+5 bit 7 clear): nothing
9CAB RET Z If bit 7 of byte +5 of the record at IX is clear, return
9CAC LD HL,$9CA1 Point HL at 9CA1 in "After-turn routines for nine characters" - The countdown at 9CA1: $FF means it has run out already
9CAF LD A,(HL) Read the byte at 9CA1 in "After-turn routines for nine characters" into A
9CB0 CP $FF Compare A with $FF
9CB2 RET Z If A equals $FF, return
9CB3 DEC (HL) Subtract one from the byte HL points at - One turn less; carry on only when it reaches 0
9CB4 RET NZ If the byte HL points at is not zero, return
9CB5 LD HL,$015B Load HL with $015B - Describe the note as BURNT (word $015B in +9/+10)...
9CB8 LD (IX+$09),L Store L in byte +9 of the record at IX
9CBB LD (IX+$0A),H Store H in byte +10 of the record at IX
9CBE XOR A Clear A to zero (and the carry flag) - ...and clear its +13 and +14
9CBF LD (IX+$0D),A Store A in byte +13 of the record at IX
9CC2 LD (IX+$0E),A Store A in byte +14 of the record at IX
9CC5 LD IX,$99B7 Point IX at 99B7 in "The case: statements about the crime, and..." - Case record 99B7: clear bit 1 of +3
9CC9 RES 1,(IX+$03) Clear bit 1 of byte +3 of the record at IX
9CCD RET Return to the caller
Prev: 9C85 Up: Map Next: 9CCE