| Routines

38601: Check whether ENTER, 0 or the fire button is being pressed

Used by the routine at 38562. Returns with the zero flag reset if ENTER, 0 or the fire button on the joystick is being pressed.
38601 | LD A,(34254) | Collect the Kempston joystick indicator from 34254
38604 | OR A | Is the joystick connected?
38605 | JR Z,38612 | Jump if not
38607 | IN A,(31) | Collect input from the joystick
38609 | BIT 4,A | Is the fire button being pressed?
38611 | RET NZ | Return (with the zero flag reset) if so
38612 | LD BC,45054 | Read keys H-J-K-L-ENTER and 6-7-8-9-0
38615 | IN A,(C)
38617 | AND 1 | Keep only bit 0 of the result (ENTER, 0)
38619 | CP 1 | Reset the zero flag if ENTER or 0 is being pressed
38621 | RET |