Prev: AB9B Up: Map Next: AC06
ABD7: See if the 'in' key was pressed and set A to 1 if it was
Used by the routines at AC06, ED2A and F93A.
ABD7 LD A,($B2DB) Get the current control mechanism. (B2DB)
ABDA OR A Is it 0? (Keyboard)
ABDB JR Z,$ABEA Jump forward if it is.
ABDD CP $01 Is it 1? (Kempston)
ABDF JR NZ,$ABFC Jump forward if it is.
Handle Kempston input.
ABE1 IN A,($1F) Read the Kempston interface.
ABE3 BIT 3,A Was "up" pressed?
ABE5 JR Z,$AC04 Jump to set "no input" if it wasn't.
ABE7 LD A,$01 Other set "in pressed" and return.
ABE9 RET
Handle keyboard input.
ABEA LD A,$FD
ABEC IN A,($FE)
ABEE LD B,A
ABEF LD A,$BF
ABF1 IN A,($FE)
ABF3 AND B
ABF4 OR $E0
ABF6 CP $FF
ABF8 JR NZ,$ABE7
ABFA JR $AC04
Handle Sinclair input.
ABFC LD A,$EF
ABFE IN A,($FE)
AC00 BIT 1,A
AC02 JR Z,$ABE7
'in' wasn't pressed, so reset the flag.
AC04 XOR A Set result as 0 and return.
AC05 RET
Prev: AB9B Up: Map Next: AC06