Prev: 37675 Up: Map Next: 37708
37687: Check whether ENTER or the fire button is being pressed
Used by the routine at 37596. Returns with the zero flag reset if ENTER or the fire button on the joystick is being pressed.
Input
Output
37687 LD A,(33881) Pick up the Kempston joystick indicator from 33881
37690 OR A Is the joystick connected?
37691 JR Z,37698 Jump if not
37693 IN A,(31) Collect input from the joystick
37695 BIT 4,A Is the fire button being pressed?
37697 RET NZ Return (with the zero flag reset) if so
37698 LD BC,49150 Read keys H-J-K-L-ENTER
37701 IN A,(C)
37703 AND 1 Keep only bit 0 of the result (ENTER)
37705 CP 1 Reset the zero flag if ENTER is being pressed
37707 RET
Prev: 37675 Up: Map Next: 37708