Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!tut!santra!tuura!risto From: risto@tuura.UUCP (Risto Lankinen) Newsgroups: comp.sys.ibm.pc Subject: Re: STACK OVERFLOW, SYSTEM HALTED Message-ID: <610@tuura.UUCP> Date: 24 Jan 90 13:53:52 GMT References: <672@tnosoes.UUCP> Organization: Nokia Data Systems Oy Lines: 30 joep@tnosoes.UUCP (Joep Mathijssen) writes: >Can somebody help me with this error: > 'STACK OVERFLOW, SYSTEM HALTED'. The MS-DOS -originated STACK OVERFLOWs are generated mainly by several interrupts occurring simultaneously or in a short period of time in their reverse priority order (or even a single interrupt, whose handler is incorrectly designed so that it clears it "served"-flag before actually being that). The result is that the stack soon fills up of saved CPU registers and return addresses... Fortunately there is a CONFIG.SYS setting in MS-DOS versions (I think) above 3.00 . That is STACKS=, . For example, in CONFIG.SYS, STACKS=8,512 creates 8 stacks for interrupt service routines, each 512 bytes in size (and spends memory accordingly). The STACKS=0,0 disables stack switching feature. As far as I know, the default is 9,128 , which should of course be exceeded in order to fix the problem. One more thing, the STACKS setting affects only those interrupts that MSDOS.SYS or IO.SYS is responsible to care for. I haven't seen specs for how one can use this in one's own devdrvs; if such have been seen I would like to know where to get that info. terveisin: Risto Lankinen --