how we can know that where exactly in the memory
is our data segment , code segment and stack
segment.
thanx for ur help
CS DS SS
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:CS DS SS
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
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