A86: Re: Getting numbers......
[Prev][Next][Index][Thread]
A86: Re: Getting numbers......
I've attached a demo program I wrote with the routine PromptNumHL. It
allows the user to enter a number using the keypad, which is returned in HL.
Number entry stops when enter is pressed. It also allows backspace using
delete. It tries to detect and quit when they enter a number too big, but
it doesn't always work. There is nothing the user can do to crash it, but
if they enter a number that is too big it might return a bogus number
(whatever _mulHL10 decides to return). You're welcome to add stricter
checking. I'm too lazy :-)
>
>What would i do to allow the user to input a number between 0, and 999?
>The program im making will loop a routine this many times, so i would need
to save it to
>registers.
>
>Ive seen many input routines, but they are mainly for strings.
promptnum.asm