[comp.sys.ibm.pc] CONFIG.SYS, STACKS=9,128, AN EXPLANATION?

sward@cfa.HARVARD.EDU (Steve Ward) (05/13/89)

Could some kind, informed soul shed some light on what happens
when, within CONFIG.SYS, the entry STACKS=9,128 is included?

My DOS manual and references only provide a couple of sentences,
stating that the config.sys stacks declaration results in creating
a pool of HARDWARE INTERRUPT STACKS that msdos will allocate, one
per hardware interrupt.  Further, it is stated that for an XT the
default (no STACKS declaration in config.sys) will result in no
stack pool being created and hence DOS will not allocate any stack
upon a hardware interrupt, and for an AT the default is nine stacks
of depth 128 bytes.  The first numerical argument represents the
number of stacks in the pool (up to 64) and the second number is the
stack depth (typically 128 bytes but can go up to 64K, I guess).

With the above STACKS=9,128 I then conclude that a hardware interrupt
stack pool of 9 stacks of depth 128 is creatd by MSDOS.  Fine, this
part is easy.  But my 8086 hardware manual makes it clear that the
various hardware interrupts are each directly vectored, so I am
puzzled as to how MSDOS can allocate, upon a hardware interrupt, an
interrupt stack.  Does this mean that for the XT default (no STACKS
entry in config.sys) that MSDOS leaves the 9 hardware interrupt
vectors (NMI plus IRQ 0-7) alone, so that the BIOS-provided interrupt
routines are executed as-is, but that when in config.sys there is a
STACKS entry, that MSDOS, upon loading and configuration, chains to
these hardware vectors, effectively intercepting them to first
set up a stack and then jumping to execute the interrupt routines?

I'll summarize if there is enough interest.  Please send responses
directly to me.

Steve W.   ward@cfa.harvard.edu    ...harvard!cfa!ward