Sherlock: annotated disassembly

Routines

Prev: E66F Up: Map Next: E6E6
E6BC: Action record: the cabbie names the fare (RUN at $F326)
Addresses named in the title: F326.
Prints '"Right guv'nor that will be Nd."' using the negative of the cabbie's purse balance.
Input
$A035 The cabbie
Output
F NZ; the fare named
E6BC DEFB $0D,$0C Action record header: flags $0D; byte 1 $0C
E6BE LD A,($A035) Read $A035 in "Game variables" into A - The indirect object ($A035): is anything held by it (E619)?
E6C1 CALL $E619 Call E619 (inside "Action record: RUN at E08F; RUN at E46B;...")
E6C4 JR Z,$E6E3 None: return NZ
E6C6 LD E,(IX+$09) Read byte +9 of the record at IX into E - DE = the word at IX+9/+10
E6C9 LD D,(IX+$0A) Read byte +10 of the record at IX into D
E6CC LD HL,$6BB7 Point HL at the message "YOU SAY TO THE OIL LAMP" RIGHT GUV'NOR THAT WILL... (6BB7)
E6CF CALL $A59F Call the routine "Print the message at HL" (A59F)
E6D2 LD HL,$0000 Load HL with $0000
E6D5 AND A Clear the carry flag, so that the subtraction that follows is a plain one (a compare)
E6D6 SBC HL,DE Subtract DE from HL (a compare: carry = HL was smaller, zero = equal)
E6D8 CALL $A419 Call the routine "Print an amount of money" (A419)
E6DB LD A,$22 Load A with $22
E6DD CALL $A9B7 Call the routine "Print character A, a word at a time (word wrap)" (A9B7)
E6E0 CALL $A2A2 Call the routine "Print a newline (A kept)" (A2A2)
E6E3 OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller
E6E5 RET Return to the caller
Prev: E66F Up: Map Next: E6E6