please dont rip this site

When DOS takes control after a function call, it switches to an internal stack. Registers which are not used to return information (other than AX) are preserved. The calling program's stack must be large enough to accomodate the interrupt system - at least 128 bytes in addition to other interrupts.

DOS actually maintains three stacks -

stack 1: 384 bytes (in DOS 3.1) for Int/25 and Int/26, as well as Dos Functions Int/21f/00, Int/21f/0D and up.

stack 2: 384 bytes (in DOS 3.1) for Int/21f/01 through Int/21f/0C.

stack 3: 48 bytes (in DOS 3.1) for functions 0Dh and above. This stack is the initial stack used by the Int/21 handler before it decides which of the other two to use. It is also used by Int/21f/59 (get extended error), and 01h to 0Ch if they are called during an Int/24 (critical error) handler. Int/21f/33 (get/set break flag), Int/21f/50 (set process ID), Int/21f/51 (get process ID) and Int/21f/62 (get PSP addr) do not use any DOS stack under DOS 3.x (under 2.x, 50h and 51h use stack 2).

IBM and Microsoft made a change back in DOS 3.0 or 3.1 to reduce the size of DOS. They reduced the space allocated for scratch areas when interrupts are being processed. The default seems to vary with the DOS version and the machine, but 8 stack frames seems to ring a bell. That means that if you get more than 8 interrupts at the same time, clock, disk, printer spooler, keyboard, com port, etc., the system will crash. It seems to happen usually on a network. The CONFIG.SYS DOS\Commands -STACKS=16,256 means allow 16 interrupts to interrupt each other and allow 256 bytes for each for scratch area. Eight is marginal.

DOS 3.2 does some different stack switching than previous versions. The interrupts which are switched are:

Int/02, Int/08, Int/09, Int/0A, Int/0B, Int/0C, Int/0D, Int/0E,Int/70, Int/72, Int/73, Int/74, Int/75, Int/76, Int/77.

DOS 3.2 has a special check in the initialization code for a PCjr and doesn't enable stack switching on that machine.

Comments:


file: /Techref/dos/Stacks.htm, 2KB, , updated: 2008/5/6 13:17, local time: 2024/4/23 21:23,
TOP NEW HELP FIND: 
18.218.129.100:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.piclist.com/techref/dos/Stacks.htm"> Operating System - MSDOS/PCDOS - Memory Map - DOS Structures - Stacks</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .