CS DS SS

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
adeelmahmood1

CS DS SS

Post by adeelmahmood1 »

how we can know that where exactly in the memory
is our data segment , code segment and stack
segment.
thanx for ur help
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:CS DS SS

Post by Pype.Clicker »

you can easily extract the limit of a segment using LSL (Load Segment Limit). The base of the segment is more complex to find and cannot be guessed if you don't read the GDT.

However, nothing should prevent you to make a local cache table that will map the last selectors that have been looked up to their base (read from the GDT)

usercopy.c oin Clicker does something like this ...

Hope this helps
Post Reply