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 


FLAGS!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Sat Apr 02, 2016 7:22 pm    Post subject: FLAGS! Reply with quote

Sorry for the capitalized title, but I wanna rage. Very Happy

The instructions that changes the flags are making me crazy.
Suppose:
EAX == 0000021F

after the following code:
Code:

cmp eax,00000513


CF, PF and SF are all set to 1.

According to a tutorial, "PF : Parity Flag. Set if the number of set bits in the least significant byte is a multiple of 2." But I don't see any multiple of 2 in the numbers above....

Can anyone explain about how the flags and comparison work? Sad
Thanks.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Apr 02, 2016 9:45 pm    Post subject: Reply with quote

I don't use these flags much, so someone can correct me when I'm wrong. Smile

CMP is equivalent to a SUB.
0513 - 021F = FD0C == ‭1111 1101 0000 1100‬
PF only reflects the least significant (last) byte.
0000 1100 contains 2 ones. 2 is an even number.

Flag set.
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Sat Apr 02, 2016 11:04 pm    Post subject: Reply with quote

Zanzer wrote:
I don't use these flags much, so someone can correct me when I'm wrong. Smile

CMP is equivalent to a SUB.
0513 - 021F = FD0C == ‭1111 1101 0000 1100‬
PF only reflects the least significant (last) byte.
0000 1100 contains 2 ones. 2 is an even number.

Flag set.

Sorry for the late reply.
Oh, its the last "byte", i thought it was "bit"... Got it, thanks.
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 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