Sherlock: annotated disassembly

Routines

Prev: D769 Up: Map Next: D77E
D770: Fail if the next token is of class $C0
The pre-check named in the header of the record at D769 (flags $40, part of the player's own script): looks at the token at (D6BD).
Input
$D6BD The next token
Output
F NZ if it is not the end of the line; otherwise the turn fails through $DC15
D770 LD HL,($D6BD) Read D6BD in "A flag of the player's script step, and..." into HL - The next token's class (the word list pointer D6BD)...
D773 LD A,(HL) Read the byte HL points at into A
D774 AND $F0 Keep only bits 4, 5, 6, 7 of A (mask $F0)
D776 CP $C0 Compare A with $C0 - ...is $C0 (the end of the line): fail (DC15)
D778 JP Z,$DC15 If A equals $C0, jump on to the routine "Fail: A = 0, HL = 0, Z set" (DC15)
D77B OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller - Otherwise pass
D77D RET Return to the caller
Prev: D769 Up: Map Next: D77E