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 


cmp eax,01 and/or cmp eax,06???

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Mon Mar 02, 2015 6:50 pm    Post subject: cmp eax,01 and/or cmp eax,06??? Reply with quote

Just like the title says, can you do something like that? I pretty much want to compare two instructions and get either a true or false.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 958

PostPosted: Mon Mar 02, 2015 8:10 pm    Post subject: Reply with quote

IF eax == 1 or eax == 6 THEN do something

Code:
cmp eax,1
je  @f
cmp eax,6
@@:
jne @f -- or replace with a named label
//
// do on condition eax == 1 or eax == 6
//
@@:    -- matching named label if any


IF eax == 1 or eax == 6 THEN do something ELSE do otherthing

Code:
cmp eax,1
je  @f
cmp eax,6
@@:
jne @f -- or replace with a named label
//
// do on condition eax == 1 or eax == 6
//
jmp continue
@@:    -- matching named label if any
//
// do on condition eax != 1 AND eax != 6
//
continue:
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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