Routines
| Prev: D6B8 | Up: Map | Next: D6CE |
D6BF: Player's turn: read a line from the keyboard (RUN at $9923)
|
Addresses named in the title: 9923.
The body reads a line with the line editor (D898, with a fresh key time limit), fails (DC15) if nothing came, and clears D714. Part of the player's own plan script.
This record is one step of the loop in the player's own plan script at 9921: DO LOOK once, then read a line (D6BF), split it into words (D715), check there is a word (D769), parse a sentence (D77E), check there is a sentence (D7D9), turn it into a command (D7FA) and DO it. When you wear the china man's disguise the same script runs for him; the counts below include both.
|
||||||||
| D6BF | DEFB $00,$00 | Action record header: flags $00; byte 1 $00 | ||||||
| D6C1 | CALL $D898 | Call the routine "Read a line from the keyboard, with a time limit" (D898) - Read the player's line (D898); nothing typed: fail | ||||||
| D6C4 | JP Z,$DC15 | If the zero flag is set, jump on to the routine "Fail: A = 0, HL = 0, Z set" (DC15) | ||||||
| D6C7 | XOR A | Clear A to zero (and the carry flag) - D714 = 0, return NZ | ||||||
| D6C8 | LD ($D714),A | Store A in "Flag: repeat the last command ('@')" (D714) | ||||||
| D6CB | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller | ||||||
| D6CD | RET | Return to the caller | ||||||
| Prev: D6B8 | Up: Map | Next: D6CE |