Page 1 of 1

Expand Down Data Segments (Stack)

Posted: Wed Sep 04, 2002 6:36 am
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?

Re:Expand Down Data Segments (Stack)

Posted: Wed Sep 04, 2002 6:50 am
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 ;)