Prev: 9686 Up: Map Next: 96A8
969A: Wait until any key is pressed
Used by the routine at DESCRIBE_LOCATION.
Polls the whole keyboard through port $FE and returns once something is held, setting the border white on the way out. The game drops into it whenever a picture is finished -- the opening one, and each new location's after that -- before the next prompt, and a key pressed there is taken as "carry on" and not as a letter, which is why the first letter of a command typed while a picture was drawing went missing. (The title screen does not use this: it waits in its own loop at TITLE_WAIT.)
WAIT_FOR_ANY_KEY 969A XOR A Wait until any key is down
969B IN A,($FE)
969D AND $1F
969F CP $1F
96A1 JR Z,WAIT_FOR_ANY_KEY
96A3 LD A,$07 White border
96A5 OUT ($FE),A
96A7 RET
Prev: 9686 Up: Map Next: 96A8