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 


Question about bytes and opcodes etc..

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Jesper
Grandmaster Cheater Supreme
Reputation: 9

Joined: 21 Feb 2007
Posts: 1156

PostPosted: Fri Jun 04, 2010 10:40 am    Post subject: Question about bytes and opcodes etc.. Reply with quote

I have been wondering for a while how the memory viewer in cheat engine knows where to put a "new line" after a certain amount of bytes and how it converts the bytes to opcodes. My guess is that it knows when one asm "command" is complete, but that leaves my second question.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Fri Jun 04, 2010 10:48 am    Post subject: Reply with quote

http://www.intel.com/Assets/PDF/manual/253666.pdf
http://www.intel.com/Assets/PDF/manual/253667.pdf

usually:
read the bytes until it's not a prefix byte
Then look up what kind of opcode it is
Then depending on the opcode read the modrm byte
and if the modrm byte says it has a sib byte, also the byte(sib) after that
and finally the addressing offset if it has one

the first byte doesn't always define what exact opcode it is, in some cases where there is no secondary parameter the byte can be shared with multiple instructions. In that case you must check the /reg field of the modrm byte to find the opcode. And then there's also some multi-byte opcodes (simd, 0f xx)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Jesper
Grandmaster Cheater Supreme
Reputation: 9

Joined: 21 Feb 2007
Posts: 1156

PostPosted: Fri Jun 04, 2010 11:13 am    Post subject: Reply with quote

Thanks for the fast reply. I will try to figure it out now.
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 programming 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