Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


comparing flags

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials
View previous topic :: View next topic  
Author Message
OldCheatEngineUser
Whateven rank
Reputation: 2

Joined: 01 Feb 2016
Posts: 311

PostPosted: Sat Jun 17, 2017 9:04 pm    Post subject: comparing flags Reply with quote

hey,

i need some real help since im stuck at the moment.

how to compare cFlag?
how to compare aFlag?

its important guys, also learning to compare flags in general is important to me.
any guide, help hand is appreciated.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
patched cheat engine tutorials
Back to top
View user's profile Send private message
FreeER
Expert Cheater
Reputation: 9

Joined: 09 Aug 2013
Posts: 225

PostPosted: Sat Jun 17, 2017 9:46 pm    Post subject: Reply with quote

Um, do you mean the carry and Auxiliary/Adjust flags? If so then you have jc/jnc for jump when carry is set (1) and jump when carry is not set (0). As for the aux flag I've never had to check so I had to google http://www.vcfed.org/forum/showthread.php?17952-8086-auxiliary-flag

Code:
      pushf
     pop ax
     test al,10h
     jnz   ....      ; if AC set


If you aren't looking for that info then you may want to be more specific...
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 2

Joined: 01 Feb 2016
Posts: 311

PostPosted: Sat Jun 17, 2017 11:07 pm    Post subject: Reply with quote

hey,

sorry forgot to say that i fixed my carry compare just remembered the jnc seconds after writing the post so my current issue is af.

at the moment im at work so i dont remember my script very well but i think accumulator register is used so idk if it will affect my code since pop ax is used and test al so i feel it gonna mess it, ill try later. thanks for you and for your googling Smile


EDIT: i think its jbe/jna.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
patched cheat engine tutorials
Back to top
View user's profile Send private message
FreeER
Expert Cheater
Reputation: 9

Joined: 09 Aug 2013
Posts: 225

PostPosted: Sun Jun 18, 2017 6:26 am    Post subject: Reply with quote

if you won't want to overwrite ax then you can just push it before the flags and pop it after the test or pop the flags into another register that you don't mind overwriting, whichever is simpler for you Smile

Code:
push ax         // save current value
pushf          // push flags register to stack
pop ax        // pop flags into ax
test al,10h  // test for aux flag
pop ax      // restore original value
jnz   ...  // jump if zero flag is not set meaning the aux flag was set


You can see what flags a jump checks here: http://unixwiz.net/techtips/x86-jumps.html
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 2

Joined: 01 Feb 2016
Posts: 311

PostPosted: Sun Jun 18, 2017 3:47 pm    Post subject: Reply with quote

i tried out your code, but seems not working.
ill forget about this method.
better to break and trace and modifying the root.

btw thank you for your time and trying to help.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
patched cheat engine tutorials
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites