Expand Down Data Segments (Stack)

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
PlayOS

Expand Down Data Segments (Stack)

Post by PlayOS »

Hi,

I noticed in the Intel manauls that an expand down data segment must be used with offset's greater than the limit, so a 16bit segment would have a range of LIMIT upto LIMIT + FFFF therefore creating a 64KB stack that can expand by decreasing the LIMIT. However it says nothing about what the base should be. What is the normal base for an expand down segment? What would happen if the base was equal to LIMIT and then LIMIT was decreased?
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:Expand Down Data Segments (Stack)

Post by Pype.Clicker »

you can put the base of your expand-down segment (which is, in fact the top of it if using 32 bits segments) wherever you want. note that for a 16bit expand-down segment, 64Kb is the maximal extension, not the minimal one, so it can't extend anymore. If your exp-down segment is completely expanded, then every offset in it is valid (and therefore, it can't be distinguished from an expand-up segment ;)
Post Reply