Prev: 63657 Up: Map Next: 63691
63668: If key-press was enqueued then return index of last key pressed, else wait for key-press and return index
Used by the routine at 63740.
Output
A Index of key pressed
The operand of the instruction at 63668 represents an enqueued key-press. This is modified by the instructions at 63686 and 63749.
63668 LD A,0 Load A with enqueued key index...
63670 OR A ...and if not zero...
63671 JR NZ,63677 ...then skip ahead to 63677
63673 XOR A Clear last pressed key...
63674 LD (23560),A ...
63677 HALT Wait for interrupt
63678 LD A,(23560) Load last pressed key into A...
63681 OR A ...and if this is zero (i.e. no key pressed)...
63682 JR Z,63677 ...then loop back to 63677
63684 EX AF,AF' Switch AF and AF'
63685 XOR A Set enqueued key index to zero...
63686 LD (63669),A ...
63689 EX AF,AF' Switch AF and AF'
63690 RET Return
Prev: 63657 Up: Map Next: 63691