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 


why segment registers?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
SpaceUrkel
How do I cheat?
Reputation: 0

Joined: 25 Feb 2012
Posts: 8

PostPosted: Sat Feb 25, 2012 3:07 pm    Post subject: why segment registers? Reply with quote

Hey, new forummember here! How is it going, people?

I have a question for all you ASM-cracks out there, I am currently (lies)
trying to get into ASM and debugging and its fairly okay to learn, but there
are a few things that google won't answer me instantly and just keeps
bugging me.

For example:
Why do 32/64-bit program still use segment registers like ds,ss,es?
I can perfectly store every address in one of the effective registers
(i.e. eax,ebx,ecx,edx,edi,esi)...

I am using OllyDBG on Win7. Thanks
-SpaceUrkel Very Happy

_________________
et illus fugit
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Sat Feb 25, 2012 3:19 pm    Post subject: Reply with quote

First of for security. Code running in a usermode code segment can not access kernelmode pages

Second, for distinguishing between 16, 32 and 64-bit code, and data access.

Third, for making software development easier. A segment register can have a base address. So accessing fs:[0] accesses the first byte of that base. This can be used for thread specific information so threads do not need to know where the thread information is stored(in case of fs:[0] it's related to exception handling)

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
SpaceUrkel
How do I cheat?
Reputation: 0

Joined: 25 Feb 2012
Posts: 8

PostPosted: Sat Feb 25, 2012 3:29 pm    Post subject: Reply with quote

Okay, so for 32/64 bit programming it's more of a convenience than an essential, i take?
_________________
et illus fugit
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Sat Feb 25, 2012 3:40 pm    Post subject: Reply with quote

It's still required for protection, but that's mainly goverened by the os and not the app
But ,in 64 windows you can use it to execute 64 bit code in a 32 bit process, and the other way around

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
SpaceUrkel
How do I cheat?
Reputation: 0

Joined: 25 Feb 2012
Posts: 8

PostPosted: Sat Feb 25, 2012 3:44 pm    Post subject: Reply with quote

Thanks for the help. Smile
_________________
et illus fugit
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