Sherlock: annotated disassembly

Routines

Prev: 9E74 Up: Map Next: 9EA2
9E85: Game-over record: the Major is arrested
Does nothing once $9E88 - the operand of its own LD A,$00 (self-modifying) - is non-zero, which the routine of the case statement MAJOR PERCIVAL FFOULKES IS INNOCENT sets when it is proven (9A3D, which also prints 70F0: 'VERY GOOD HOLMES, I SHALL RETURN TO LEATHER HEAD TOMORROW TO HAVE ANOTHER LOOK AROUND.'). Otherwise prints 6975 ('AS THE MAJOR ENTERS LESTRADE ATTEMPTS TO ARREST HIM...') and ends the game with 69BF ('...WELL HOLMES THAT WRAPS UP THIS CASE, SORRY YOU WERE NOT OF MORE HELP...') if Lestrade is where the player is ($A009 = A00A), or 6A26 ('INSPECTOR LESTRADE ENTERS AND SAYS...') if not. Run by Lestrade's script (E96B).
Lestrade's script reaches this record at about 1am on Tuesday with $9E88 still 0, and the game ends with 'Inspector Lestrade enters and says to you " Well Holmes that wraps up this case, sorry you were not of more help but you cannot solve them all you know. ". Despite his assurances you cannot help feeling there should be more to this case. Perhaps you should try again.' (the player was elsewhere, so 6975 was not shown).
9E74 is the shared ending: prints the message in HL, waits for a key (C306), and restarts (B0AC).
Output
F NZ and nothing printed once $9E88 is non-zero; otherwise the game ends through $9E74
9E85 DEFB $00,$00 Action record header: flags $00; byte 1 $00
9E87 LD A,$00 Load A with $00
9E89 AND A Clear the carry flag for the caller (A is unchanged)
9E8A RET NZ If A is not zero, return
9E8B LD HL,$6975 Point HL at the message "AS THE MAJOR ENTERS LESTRADE ATTEMPTS TO ARREST... (6975)
9E8E CALL $A59F Call the routine "Print the message at HL" (A59F)
9E91 LD A,($A009) Read the room the player is in, which decides what is shown ($A009) into A
9E94 LD HL,$A00A Point HL at the current actor's room (A00A)
9E97 CP (HL) Compare A with the byte at the current actor's room (A00A)
9E98 LD HL,$69BF Point HL at the message "INSPECTOR LESTRADE SAYS TO YOU" WELL HOLMES THAT... (69BF)
9E9B JR Z,$9E74 If A equals the byte at the message "INSPECTOR LESTRADE SAYS TO YOU" WELL HOLMES THAT... (69BF), go back to the routine "End the game with the message in HL" (9E74)
9E9D LD HL,$6A26 Point HL at the message "INSPECTOR LESTRADE ENTERS AND SAYS TO YOU" WELL... (6A26)
9EA0 JR $9E74 Go back to the routine "End the game with the message in HL" (9E74)
Prev: 9E74 Up: Map Next: 9EA2