Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How not to permit user from inputing a invalid characters

kindly help me..
i have this idea that the user can only type letters from a-z / A-Z
if the user type other character besides the given from the permitted characters the computer will ask again for the input it will only stop when the user have the right input.
then if the user type letter "D" (for example) then the screen will display D-Z characters. or example the input is "r" then the screen will display r-z letters..
i'm using the dos command can u help me with my prob? i have a sample program but it allows the user from entering special characters. which is my prob.. it shouldn't allow the user...

0AEE:0100 mov ah,07
0AEE:0102 int 21
0AEE:0104 mov ah,02
0AEE:0106 mov dl,al
0AEE:0108 int 21
0AEE:010A inc dl
0AEE:010C cmp dl,5a
0AEE:010F jle 108
0AEE:0111 cmp dl,5b
0AEE:0104 jz 011f
0AEE:0106 int 21
0AEE:0108 inc dl
0AEE:010A cmp dl,7a
jle 0116
int 20

>>> hope you can help thanks ^_^


  • BitByBit_ThorBitByBit_Thor Member Posts: 2,444
    Please, follow the Forum guidelines and don't double post (also posted at x86 assembly).

    Pick one (Sub-)Forum to post in and stick to that one.
    Best Regards,

    The way I see it... Well, it's all pretty blurry
  • kmtdkkmtdk Member Posts: 30
    the things you have to do is first to check if it is a low or upper case character, and then you have to print the character there were pressede, and then add (if it is al, witch holds the character,add it by one) it by one and cmp it with 'z' (if it is lower case).
    (if you want me to make a source code, i will)

Sign In or Register to comment.