 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Sat Sep 01, 2012 10:39 am Post subject: How does Assemblers test work? |
|
|
I guess im kind of dumb in this place but i couldnt find any answer in the internet that i actually understood entirely.
The cmp operation is quite intuitive. You just cmp val1, val2 and can use the conditional jumps (je, jle, ja) etc.
Now, when you use test val1, val2, i doubt that you can use those conditional jumps on the same way you do after a cmp, because if you could, there wouldnt be to instrucitons that are basically doing the same. All i found out is that test is doing a logical and on the values and then sets some flags. But thats the point, nobody writes WHICH flags are set and HOW they are set. I also didnt get which flags jae uses, since there is no "was-above-flag" or something like that.
So questions are:
1: How do the operations cmp and test work and which behavior using conditional jumps do i have to expect and why?
2: how do the jumps like jae that appearently dont use flags work?
3: what the heck is the difference between jae and jge anyways?
|
|
Back to top |
|
 |
HenryEx Expert Cheater
Reputation: 2
Joined: 18 Dec 2011 Posts: 100
|
Posted: Sat Sep 01, 2012 3:16 pm Post subject: |
|
|
'test' does an 'and' operation without storing the result in the first register. That's all.
Comparably (heh), 'cmp' just does a 'sub' operation without storing the results to a register.
Both test and cmp do modify the same flags that their "parent" instruction does, though.
Also, you could have just looked up in wikipedia. The TEST (x86 instruction) has its own page.
Oh and also start up the CheatEngine help file and read ASM basics 3. You'll ifind most of your answers there.
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|