I was wondering and I hope some one can help. I want to now if a sentence or string was entered by the keyboard by the user before I do something with the string. Basically I want to make sure they typed characters and not just hit enter and didn't type anything. How would I do that? I tried null but the CR is putting a binary value in there so how would I check if text was entered? thanks
Posted on 2004-10-09 09:45:17 by skull_block
Then check whether CRLF exist.
Posted on 2004-10-09 10:44:28 by roticv
Are you saying to check if CRLF exsist because LF will only exists if somehting was typed? Sorry I am new to assembly still learning. Thanks for helping.
Posted on 2004-10-09 10:51:22 by skull_block
I mean by search for a CRLF followed by a null as the first 3 characters, since there will always be a CRLF
Posted on 2004-10-09 10:58:21 by roticv
Is this what you are referring to doing? Thank you very much for your help
mov	bx,offset charstr

mov al,[charstr + bx]
inc bx
cmp ax,'CR'
je choice5error
cmp ax,'LF'
je choice5error
cmp ax,'NUL'
je choice5error[code][/code][/color]
Posted on 2004-10-11 09:43:00 by skull_block
Thanks for you help. I found out what I was doing wrong. I should have been comparing hex values not the ascII values. Which makes since now. Thank you.
Posted on 2004-10-11 10:10:01 by skull_block