Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!uflorida!beach.cis.ufl.edu!dor From: dor@beach.cis.ufl.edu (Douglas R. Oosting) Newsgroups: comp.lang.pascal Subject: Re: Help with stack overflow Keywords: turbo error trapping help stack Message-ID: <22880@uflorida.cis.ufl.EDU> Date: 12 Apr 90 17:20:29 GMT References: <22863@uflorida.cis.ufl.EDU> <2577@rwthinf.UUCP> Sender: news@uflorida.cis.ufl.EDU Reply-To: dor@beach.cis.ufl.edu (Douglas R. Oosting) Followup-To: comp.lang.pascal Distribution: comp Organization: UF CIS Department Lines: 24 In article <2577@rwthinf.UUCP> pmk@cip-s01.UUCP (Michael Keukert) writes: [a very long and detailed way to implement automatic exit code and error handler in Turbo 5.0, deleted.] That IS the way I have this done...it works properly too..HOWEVER, the problem with this method is when the error is a stack overflow, MY ROUTINE DOES *NOT* EXECUTE. Apparently, seeing as it is a user routine, Turbo refuses to try to run it as it cannot push it onto the stack. That is the thrust of my question...apparetnly there are pointers in the SYSTEM unit (stackptr and stacklimit or something like that) which could be used to determine the current stack size...but it seems a mite cumbersome (if not well-nigh impossible) to check these before every function call! I did neglect ot mention that my stack size for the program is set to the max that turbo will handle ... 65520 bytes... Any other input? Thanks... Doug Oosting -- And in the end/the love you take | Douglas R. Oosting, University of Florida is equal to/the love you make | dor@beach.cis.ufl.edu | dro@gnv.ifas.ufl.edu FNORD!--------The Earth is Our Mother, treat her with respect------------FNORD! In the Society : Cadrys ap Dulas o Caereira, Barony of An Crosaire, Trimaris