[comp.sys.ibm.pc] MS-DOS "STACKS=N,X" in CONFIG.SYS - ????

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

Would some kind person please help me out with this MS-DOS CONFIG.SYS
question:
           What really happens when config.sys contains "STACKS=9,128"
           or similar stacks assignment?

My MS-DOS manual says that without an explicit config.sys stacks entry
that an XT will default to "STACKS=0,0" and an AT/386 will default to
"STACKS=9,128."  Further, it states that the above example will cause
MS-DOS to configure at load time to build a HARDWARE INTERRUPT STACK
POOL of 9 hardware interrupt stacks of size or depth of 128 bytes each.

Then the default (no stacks assignment in config.sys) for an XT is that
no such hardware interrupt stack pool is created while an AT gets a
small hardware interrupt stack pool, no matter what.  An explicit
declaration of STACKS=n,x can be made for n less than or equal to 64
(number of stacks) while I surmise that x (stack size) can go up to
64K.  Okay, fine so far, but what does MSDOS really do with respect
to the hardware interrupt vectors and exactly what happens when such
a stack pool exists and a hardware interrupt occurs?  These are my
burning questions.

Here is my best guess after poring through several books and manuals,
none of which gave any more info that I have given above, unfortunately.

My guess is  that MS-DOS chains the hardware interrupt vectors so that
when a hardware interrupt occurs the vector points to an MS-DOS routine
where an interrupt stack can be allocated, then the previously saved
hardware interrupt vector is used to find and execute the BIOS-installed
hardware interrupt service routine.  Of course, for an XT when there
is no config.sys stacks assignment, this MS-DOS hardware interrupt
vector chaining does not occur at all.


I assume that only the 9 external hardware interrupts (NMI and IRQ 0-7)
are affected by MS-DOS through the stacks assignment in config.sys, is
this true?

My speculation of how things work is just that, a speculation.  I am
asking for the real facts from anyone who can shed some light on
the topic.

Please send responses to me and I will summarize if there is interest.

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

Thanks for the help!