|
-
Nov 1st, 2002, 09:25 PM
#1
Thread Starter
Member
Test
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 ???
The Programmers Credo -
Protect dumb-ass from himself.
-
Nov 2nd, 2002, 07:19 PM
#2
Junior Member
i thought
-------------------------------
CMP eax,eax
JE MyLabel
MyLabel:
Mov loo,poo
--------------------------------
would compare then jump
I believe in Death after Life!
-
Nov 2nd, 2002, 10:54 PM
#3
Thread Starter
Member
The Programmers Credo -
Protect dumb-ass from himself.
-
Nov 3rd, 2002, 05:22 AM
#4
Junior Member
CMP eax,eax
i thought that compares them
then this jumps if equal
JE 'whatever label'
I believe in Death after Life!
-
Nov 4th, 2002, 01:11 PM
#5
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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|