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 


What is the difference?

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

Joined: 28 Jun 2010
Posts: 662

PostPosted: Tue Sep 21, 2010 8:00 pm    Post subject: What is the difference? Reply with quote

Code:
mov byte ptr al,[esi]
and
mov al,[esi]
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Sep 21, 2010 8:07 pm    Post subject: Reply with quote

first one helps people that don't understand that al is 1 byte long
second one is for people that know assembler

in short, it means the same

_________________
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
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Sep 22, 2010 2:35 am    Post subject: Reply with quote

firstly your first line is not correct. that instruction is not correct. presumably you meant to say :
mov al, byte ptr ds:[esi]

when the size is not implied for the operands ( can not be inferred by the assembler ) then it must be specified explicitly. in this case al is known by the assembler to be a 8 bit register so there is no need to write that. also the first line is what is commonly generated by disassemblers. assembler programmers tend to write :
mov al, byte [esi]
Back to top
View user's profile Send private message
TROLOLOLOLOLOLOLOLOLOLOLO
Expert Cheater
Reputation: -1

Joined: 27 Dec 2009
Posts: 100

PostPosted: Wed Sep 22, 2010 2:46 am    Post subject: Reply with quote

What does that even do Shocked
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Sep 22, 2010 3:00 am    Post subject: Reply with quote

moves the byte pointed to by esi to al. in other words, it assigns al the value of the byte that esi is addressing.
Back to top
View user's profile Send private message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Wed Sep 22, 2010 5:20 am    Post subject: Reply with quote

Does cheat engine follows masm syntax?
Back to top
View user's profile Send private message Send e-mail
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Sep 22, 2010 6:17 am    Post subject: Reply with quote

Yes afaik
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