c $89B0 CHONUM ; @label:$89B0=CHONUM C $89B0 preserve BC c $89B1 User can enter a number from 1-8 or 2-8 (depending on a flag), and on return register A holds the key code minus $31 (zero if 1 was pressed, etc) ; @label:$89B1=KEYIT C $89B1 call KEYBOARD routine in ROM to set LAST-K C $89B4 jump back to KEYIT until a number between 1 and 9 is pressed C $89BE store key code in NUM variable C $89C1 load A with value of flag that prevents entering a number less than 2 C $89C4 jump to NOADD if the flag is zero C $89C7 load A with the key code of last key pressed C $89CA jump back to KEYIT if the key was less than 2 c $89CF NOADD C $89CF restore BC (stacked at $89B0 - CHONUM) C $89D0 set ATTR-T to BRIGHT, black paper, white ink C $89D8 call DH_P C $89DB point HL at key bloop sound effect C $89DE call $C2f9 C $89E1 call NKEY2 C $89E4 reset flag so that numbers less than two can be entered C $89E9 load A with value of NUM and subtract $31 (49) so that A holds 0 if 1 was pressed, etc C $89EE return to caller