Prev: 1512 Up: Map Next: 1532
151C: get_hex_digit: Wait for a keypress in the range 0-9 or A-F.
Used by the routines at enter_subcode_and_clear and get_hex.
get_hex_digit 151C PUSH HL Preserve HL.
get_hex_digit_0 151D CALL get_keypress Get a keypress.
1520 CP $30 If key code is less than $30 ('0') loop back and call again.
1522 JR C,get_hex_digit_0
1524 CP $3A Else if key code is less than or equal to $39 ('9') restore HL and return.
1526 JR C,get_hex_digit_1
1528 CP $41 Else if key code is less $41 ('A') loop back and call again.
152A JR C,get_hex_digit_0
152C CP $47 Else if key code is less than or equal to $46 ('F') restore HL and return.
152E JR NC,get_hex_digit_0
get_hex_digit_1 1530 POP HL
1531 RET
Prev: 1512 Up: Map Next: 1532