hello it's kind of cmp problem
if eax = 0
we can write
cmp eax,0
ze somewhere
then
there is no input and just hit enter button,
how can I write it?
thank you
inkey "Press a key to continue..."
and I think you mean....
cmp eax, 0
je
not ze :)
I mean how can i write the code for non input
how my code regognize there is no input and jump to exit.
Thank you :bg
I'm not sure that I understand the question.... I think you need to list more code.... if there is no/null input and either a pointer to the input/null is in eax or the length of input is in eax then
cmp eax, 0
je exit
; There is input so execute code on input here
exit:
Shawn,
We are not capable of guessing what you are doing wth your code but from the little you have told us its something like this.
cmp eax, 0
je exitlabel
; other code
.....................
exitlabel:
invoke ExitProcess etc ....
I think the question is one about no parsable input. With a routine to convert ASCII numbers to a binary value in EAX, perhaps it sets the carry flag if the input is null/void or contains characters other than numbers.
For example sscanf(input, "%d", &number) returns 0 if there is no usable input, 1 if it does, and the value is in 'number'.
call getnumber
jc failed
cmp eax,0
jz zeroentered
-Clive