Used by the routines at 24951, 31126, 60082, 61630 and 61923. Returns with the zero flag set if no key with an ASCII code in the range 48-127 was pressed. Otherwise returns with A holding the ASCII code of the last key pressed.
60121
LD HL,23611
Point HL at the system variable FLAGS
60124
BIT 5,(HL)
Check the keypress flag
60126
RES 5,(HL)
Reset the flag ready for the next keypress
60128
RET Z
Return if no key was pressed
60129
LD A,(23560)
Collect the ASCII code of the key last pressed
60132
CP 48
Is the ASCII code < 48 ('0')?
60134
JR C,60139
Jump if so
60136
CP 128
Is the ASCII code < 128?
60138
RET C
Return if so
60139
XOR A
Set the zero flag to indicate that no (relevant) key was pressed