Prev: AAE4 Up: Map Next: AB19
AAF4: Return any key pressed
Used by the routines at AA49 and AB19.
Input
H On exit, holds the bitfields key matrix tested (input to port FE), or 0 for none
L On exit, holds the keys pressed, or 0 for none
E On exit, holds the 'nth' key matrix tested ( 0 - 9 )
AAF4 LD D,$00
AAF6 LD HL,$0000
AAF9 LD B,$08
AAFB LD C,$FE
AAFD LD A,C
AAFE IN A,($FE)
AB00 AND $1F
AB02 CP $1F
AB04 JR Z,$AB12
AB06 DEC D
AB07 JR NZ,$AB0D
AB09 LD HL,$0000
AB0C RET
AB0D LD D,$01
AB0F LD L,A
AB10 LD H,C
AB11 LD E,B
AB12 SLA C
AB14 SET 0,C
AB16 DJNZ $AAFD
AB18 RET
Prev: AAE4 Up: Map Next: AB19