Routines
| Prev: E63E | Up: Map | Next: E66F |
E654: Action record: is change due? (RUN at $F304, $F31C, $F339)
|
No body; the pre-check passes only if the cabbie's purse holds a positive sum - change is due to the passenger. The cabbie's script at F2B6 reads the balance of his purse (+9/+10 of the money he holds): negative while a fare is owed, positive when change is due, zero when settled.
|
||||||||
| E654 | DEFB $40,$00,$58,$E6 | Action record header: flags $40; bit 6: pre-check at E658; byte 1 $00 | ||||||
| E658 | LD A,($A036) | Read $A036 in "Game variables" into A | ||||||
| E65B | CALL $E619 | Call E619 (inside "Action record: RUN at E08F; RUN at E46B;...") - Pre-check: does the actor hold a purse? (E619) No: refuse | ||||||
| E65E | JP Z,$DC15 | If the zero flag is set, go back to the routine "Fail: A = 0, HL = 0, Z set" (DC15) | ||||||
| E661 | CALL $E39C | HL = its money (E39C) | ||||||
| E664 | BIT 7,H | Test bit 7 of H - Negative: refuse | ||||||
| E666 | JP NZ,$DC15 | If bit 7 of H is set, go back to the routine "Fail: A = 0, HL = 0, Z set" (DC15) | ||||||
| E669 | LD A,H | Copy H into A - Nothing in it: refuse | ||||||
| E66A | OR L | Set in A the bits that are set in L | ||||||
| E66B | JP Z,$DC15 | If the result is zero, go back to the routine "Fail: A = 0, HL = 0, Z set" (DC15) | ||||||
| E66E | RET | Pass: it holds some money | ||||||
| Prev: E63E | Up: Map | Next: E66F |