| The Hobbit (v1.0) | Routines |
| Prev: 6E46 | Up: Map | Next: 6E82 |
|
Called by 6DCD when the first key of a line is '@' (SYMBOL SHIFT + 2).
If the game is waiting for the answer to a question such as 'which key?' (the flag at $B60A, set by 8765), the '@' is thrown away and the line editor goes back to waiting for a key.
Otherwise two backspaces are printed to rub out the '> ' prompt, and the routine returns with the Z flag set. (6DCD jumps here rather than calling it, so this return goes straight back to the main loop.) The main loop (6D0A) then skips tokenising and hands the old contents of the token buffer (7093) straight back to the parser. The effect is that '@' repeats the previous command, without it appearing on the screen again.
|
||||||||
| 6E71 | LD A,($B60A) | Is a command still pending? | ||||||
| 6E74 | AND A | Is A zero? | ||||||
| 6E75 | JP NZ,$6DEC | Yes: ignore the key and carry on reading the line | ||||||
| 6E78 | LD A,$08 | Rub out the "> " prompt | ||||||
| 6E7A | CALL $7580 | Print the character in A | ||||||
| 6E7D | CALL $7580 | Print the character in A | ||||||
| 6E80 | XOR A | Return with Z set: repeat the last command | ||||||
| 6E81 | RET | Done | ||||||
| Prev: 6E46 | Up: Map | Next: 6E82 |