| Routines

9337: Check whether ENTER or the fire button is being pressed

Used by the routine at 92DC. Returns with the zero flag reset if ENTER or the fire button on the joystick is being pressed.
9337 | LD A,($8459) | Pick up the Kempston joystick indicator from 8459
933A | OR A | Is the joystick connected?
933B | JR Z,$9342 | Jump if not
933D | IN A,($1F) | Collect input from the joystick
933F | BIT 4,A | Is the fire button being pressed?
9341 | RET NZ | Return (with the zero flag reset) if so
9342 | LD BC,$BFFE | Read keys H-J-K-L-ENTER
9345 | IN A,(C)
9347 | AND $01 | Keep only bit 0 of the result (ENTER)
9349 | CP $01 | Reset the zero flag if ENTER is being pressed
934B | RET |