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 Gamehacking
View previous topic :: View next topic  
Author Message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Mon Feb 10, 2014 9:31 am    Post subject: What is the difference? Reply with quote

What is the difference between :
Code:
1-mov eax,ebx


Code:
2-mov [eax],ebx


Code:
3-mov eax,[ebx]


Code:
4-mov [eax],[ebx]


please answer me!

_________________
Back to top
View user's profile Send private message
Matze500
Expert Cheater
Reputation: 8

Joined: 25 Jan 2012
Posts: 241
Location: Germany

PostPosted: Mon Feb 10, 2014 10:24 am    Post subject: Reply with quote

1. Move the content of ebx into eax

2. Move the contents of ebx into the byte at address eax

3. Move the 4 bytes in memory at the address contained in ebx into eax

4. Not possible to move memory to memory


Last edited by Matze500 on Mon Feb 10, 2014 4:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Mon Feb 10, 2014 1:34 pm    Post subject: Reply with quote

i heard when you use [] it is the value of it (the number stored to)??!!
can you give an example for each one??
i mean:
mov eax,ebx => eax=7|012a ,ebx=9|012b The result => eax=9|012a
is the above true?

_________________
Back to top
View user's profile Send private message
Matze500
Expert Cheater
Reputation: 8

Joined: 25 Jan 2012
Posts: 241
Location: Germany

PostPosted: Mon Feb 10, 2014 4:33 pm    Post subject: Reply with quote

The code above is true.

eax : value=9 address = 210000ac
ebx : value=1 address = 310000ac

For the First

mov eax,ebx

eax : value=1 address = 310000ac
ebx : value=1 address = 310000ac

For the second

mov [eax],ebx

eax : value=1 address = 210000ac
ebx : value=1 address = 310000ac

if somthing is in [] its a memory block and you have acess to its value
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Mon Feb 10, 2014 5:41 pm    Post subject: Reply with quote

It is probably much easier to remember when you type it like this

mov dword ptr [eax],ebx

CE already calculates the data type based on registers involved (eax,ebx) but if you were writing in a low level language like tasm/fasm you would use the correct addressing yourself. So its good to always remember like that. Whenever you see dword ptr you know the register or memory address that follows will have its value accessed instead of the value in register itself.

If the instruction misses the brackets [] then the value in the register itself is accessed and not the value inside the address that the register contains.

Do this, debug any program and notice how the value is moved when a certain instruction is executed, you will learn much faster that way than reading and trying to remember it.

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Tue Feb 11, 2014 6:22 am    Post subject: Thanks Reply with quote

thank you very much!
can you explain the third one too??
and i have another question:
what is the difference between (ja and jg) and also (jb and jl)??
please explain like mov Smile

_________________
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Feb 11, 2014 7:49 am    Post subject: Reply with quote

Nemexia55

launch cheatengine, press F1, Now:
Tutorials -> ASM and Hexing Theory -> Basic assembler
(also read "ASM Basics 1", "ASM Basics 2" and "ASM Basics 3")

_________________
Back to top
View user's profile Send private message MSN Messenger
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Tue Feb 11, 2014 8:41 am    Post subject: Thanks Reply with quote

Thank you very very much!
it explains very good!

_________________
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