Sherlock: annotated disassembly

Routines

Prev: D7E0 Up: Map Next: D7FA
D7E1: More of the typed line to do?
If the flag at D7E0 is set: clear it, drop the rest of the line (D88A) and fail. Otherwise succeed only if the line has another sentence waiting (9FF2). The pre-check named in the header of the record at D7D9.
Output
F NZ if another sentence is waiting; otherwise the turn fails through $DC15
D7E1 LD A,($D7E0) Read "A flag for D7E1" (D7E0) into A - D7E0 set (the line did not parse): clear it, throw the rest of the line away (D88A) and fail
D7E4 AND A Test A for zero (this leaves A as it was and clears carry)
D7E5 JR Z,$D7F1 If A is zero, skip ahead to D7F1
D7E7 XOR A Clear A to zero (and the carry flag)
D7E8 LD ($D7E0),A Store A in "A flag for D7E1" (D7E0)
D7EB CALL $D88A Call the routine "Free the rest of the typed line's word list (9FF2)" (D88A)
D7EE JP $DC15 Jump on to the routine "Fail: A = 0, HL = 0, Z set" (DC15)
D7F1 LD HL,($9FF2) Read 9FF2 in "Game variables" into HL - Otherwise: any sentence left (9FF2)? NZ if so, else fail (DC15)
D7F4 LD A,L Copy L into A
D7F5 OR H Set in A the bits that are set in H
D7F6 RET NZ If the result is not zero, return
D7F7 JP $DC15 Jump on to the routine "Fail: A = 0, HL = 0, Z set" (DC15)
Prev: D7E0 Up: Map Next: D7FA