FoolFox
November 26th, 2002, 11:52
Hello,
This may sound as a stupid question, sorry, but i'm stuck on that since
few days and my searches on the subject didn't helped me so much...
I'm trying to figure the following code, at wich condition the jump will
occurs... :
test eax,eax
je .....
EAX is a 32bit register
So far, what i know :
The TEST instruction (Test for bit pattern) performs a logical AND of
the two operands updating the flags register without saving the result
Usage: TEST dest,src
Modifies flags: CF OF PF SF ZF (AF undefined)
Ok. I can tell you that you will find that on MANY web pages, each of them
happily publihing exactly the sames infos, nothing more than what i've shown
above.
I understand the usage of the TEST instruction with a command like this one :
test ax,00000010b
here, a jump would be executed only if the second bit of ax=1, no matter
of what others bit values are, right ?
but i don't see the point of testing eax against eax ?? when this could be
an interesting condition to check ?? Does it only deal with flags ? (Carry,
Parity, Auxiliary, Sign ?)
I'm currently digging results returned by a search on 'test eax' but i'll
be there for quit a while..
..
Regards
FoolFox
This may sound as a stupid question, sorry, but i'm stuck on that since
few days and my searches on the subject didn't helped me so much...
I'm trying to figure the following code, at wich condition the jump will
occurs... :
test eax,eax
je .....
EAX is a 32bit register
So far, what i know :
The TEST instruction (Test for bit pattern) performs a logical AND of
the two operands updating the flags register without saving the result
Usage: TEST dest,src
Modifies flags: CF OF PF SF ZF (AF undefined)
Ok. I can tell you that you will find that on MANY web pages, each of them
happily publihing exactly the sames infos, nothing more than what i've shown
above.
I understand the usage of the TEST instruction with a command like this one :
test ax,00000010b
here, a jump would be executed only if the second bit of ax=1, no matter
of what others bit values are, right ?
but i don't see the point of testing eax against eax ?? when this could be
an interesting condition to check ?? Does it only deal with flags ? (Carry,
Parity, Auxiliary, Sign ?)
I'm currently digging results returned by a search on 'test eax' but i'll
be there for quit a while..

Regards
FoolFox