Prev: 71BE Up: Map Next: 7208
71FA: Get the keypress offset of the last key pressed
Used by the routines at 725E, 7316, F413 and FB3C. Returns with the zero flag set if no game keys were pressed. Otherwise returns with A holding the value from the keypress offset table corresponding to the last key pressed. This offset (an even number from 0x50 to 0x78) points at an entry in the keypress address table at E550. Each entry in that table is the address of the routine for handling a keypress.
71FA CALL $71BE Collect the ASCII code of the last key pressed in A
71FD RET Z Return if no key was pressed
71FE SUB $30 We're only interested in keys with codes 0x30 onwards
7200 JR C,$71F8 Jump if none of these was pressed
7202 LD L,A Point HL at the relevant entry in the keypress offset table at E500
7203 LD H,$E5
7205 LD A,(HL) Pick up the offset from that table
7206 AND A Set the zero flag if the offset is 0x00 (i.e. not a game key)
7207 RET
Prev: 71BE Up: Map Next: 7208