Need to understand Assembly Test and JE
I'm trying to decipher some assembly code and have come across these two lines:
%ebx holds the value 0x804c600, which in turn holds the value 0x24.
What I think that I understand is that the test command performs an and on the bits contained in the register. An and will only yield 0 if the value in the register is also 0. Otherwise, it will return the value in the register.
More relevant to this situation is that the test command also sets various condition flags, which is the point here (I think). From what I have read, JE looks at the ZF flag. If that flag is set to 1, it will jump. If it is set to 0, it will not.
In my case, I would think that ZF would be set, but it is not. Other than when the register contains the value 0 (which it does not in my case), how would these two lines ever result in the JE command actually jumping?
This is mind numbing to me. Thanks for any help.