Prev: EFCB Up: Map Next: F026
EFFC: User confirm
This waits until the user presses 'Y' or 'N', then returns an indication of which was pressed in the Z flag.
Used by the routines at keyscan_break and choose_keys.
Output
F 'Y'/'N' pressed => return Z/NZ
user_confirm EFFC LD HL,$F014 Print "CONFIRM Y OR N"
EFFF CALL screenlocstring_plot
Start loop (infinite)
user_confirm_0 F002 LD BC,$DFFE Set BC to port_KEYBOARD_POIUY
F005 IN A,(C) Read the port
F007 BIT 4,A Was bit 4 clear? (active low meaning 'Y' is pressed)
F009 RET Z Return with Z set if so
F00A LD B,$7F Set BC to port_KEYBOARD_SPACESYMSHFTMNB
F00C IN A,(C) Read the port
F00E CPL Invert the bits to turn active low into active high
F00F BIT 3,A Was bit 3 set? (active high meaning 'N' is pressed)
F011 RET NZ Return with Z clear if so
F012 JR user_confirm_0 ..loop
confirm_query F014 DEFB $0B,$50,$0F,$0C,$00,$17,$0F,$12,$1A,$16,$24,$23,$21,$23,$00,$1A,$23,$17 "CONFIRM Y OR N" / screen address $500B, length $F, string='C0NFIRM. Y 0R N'
Prev: EFCB Up: Map Next: F026