PDA

Click to See Complete Forum and Search --> : Test


BinaryAnge
Nov 1st, 2002, 08:25 PM
how does the test work, for example:

test eax, eax
je 1500d7e3

is this comparing eax to eax and then jumping if they are equal. and if so, wont they always be equal so the jump will alway happen ???

mortolee
Nov 2nd, 2002, 06:19 PM
i thought

-------------------------------

CMP eax,eax
JE MyLabel

MyLabel:
Mov loo,poo


--------------------------------

would compare then jump

BinaryAnge
Nov 2nd, 2002, 09:54 PM
what??

mortolee
Nov 3rd, 2002, 04:22 AM
CMP eax,eax

i thought that compares them

then this jumps if equal

JE 'whatever label'

CornedBee
Nov 4th, 2002, 12:11 PM
test eax, eax
is usually used with jz, to see if a register is 0 or not. You can't use it to "compare a number to itself", it doesn't make sense.