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 


Am I right? [ASM]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
rump
Expert Cheater
Reputation: 0

Joined: 03 Oct 2007
Posts: 169

PostPosted: Wed Dec 26, 2007 6:43 am    Post subject: Am I right? [ASM] Reply with quote

Hellow, I got some questions about asm I would love being answered:

* Can I think of registers - eax,edx etc as variables predefined as integers in the code?

* Why is the code in memory view in asm? Could it be in something else? that just shows how the machine code handles it, what I am saying is that the asm code in memory view is like a translation for the machine code the program uses in its memory?

* a pointer is pointing to an adress and holds a value, but it doesnt have to hold a value for that adress, am I right?

I could eventually make a asm tutorial when I get hold on how asm works more indepth thus supplying you with a reason for answering me these questions Wink

_________________
C# boot camp, PM me if you want a simple application made and I'll give it a try!
Back to top
View user's profile Send private message
rump
Expert Cheater
Reputation: 0

Joined: 03 Oct 2007
Posts: 169

PostPosted: Wed Dec 26, 2007 7:51 am    Post subject: Reply with quote

thanks ALOT x0r for the answers Smile
Quote:

eventually all code is reverted back to assembly and that's how the machine handles it. So it's always assembly.


this part removed most questionmarks in my head about assembly, I'll move on to pointers now

_________________
C# boot camp, PM me if you want a simple application made and I'll give it a try!
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Wed Dec 26, 2007 2:17 pm    Post subject: Reply with quote

There are only three all purpose registers (eax, ecx, edx). You should not modify ebp, esp, or eip. ebx, esi, and edi can be used as all purpose but after using them, you should always return them to their original values.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Wed Dec 26, 2007 2:30 pm    Post subject: Reply with quote

No, ebx isn't used anymore, so the GP registers are

Code:

EAX, ECX, EDX, EBX


And that's in the correct order, btw.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Wed Dec 26, 2007 3:34 pm    Post subject: Reply with quote

x0r wrote:
3. No, a pointer has to point to a tangible address which can be either read or written to, hence why it's called a pointer Razz


Actually, there is a dirty little hack where you can make a NULL pointer valid. Smile
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Wed Dec 26, 2007 3:53 pm    Post subject: Reply with quote

Flyte wrote:
x0r wrote:
3. No, a pointer has to point to a tangible address which can be either read or written to, hence why it's called a pointer :P


Actually, there is a dirty little hack where you can make a NULL pointer valid. :)


Or you can use Delphi!

Code:

var
     Lulz : pointer;

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
rump
Expert Cheater
Reputation: 0

Joined: 03 Oct 2007
Posts: 169

PostPosted: Thu Dec 27, 2007 9:06 am    Post subject: Reply with quote

how do you define a pointer in asm? //thanks for all the answers guys!
_________________
C# boot camp, PM me if you want a simple application made and I'll give it a try!
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu Dec 27, 2007 9:50 am    Post subject: Reply with quote

I'm a bit rusty, but try this:

Code:

lea eax, [ecx+20]

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Thu Dec 27, 2007 10:55 am    Post subject: Reply with quote

Pointer = [Base Address Value] + Offset = Destination; (Address it points to)
lea eax,[ecx+20] will just store ecx+20 in eax.
Back to top
View user's profile Send private message
rump
Expert Cheater
Reputation: 0

Joined: 03 Oct 2007
Posts: 169

PostPosted: Thu Dec 27, 2007 12:39 pm    Post subject: Reply with quote

so its a bit of a bridge between 2 adresses then? adress1+offset --> adress2
therefor adress1 is adress2 minus the offset?

_________________
C# boot camp, PM me if you want a simple application made and I'll give it a try!
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Thu Dec 27, 2007 1:48 pm    Post subject: Reply with quote

No, the value of address1 is address2-offset.
Lets say the address 10 holds the value 3, so the pointer 3 + 4 will point to the address 7.
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