Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!sri-spam!ames!ucbcad!ucbvax!hplabs!hp-pcd!hpcvlo!everett From: everett@hpcvlo.HP.COM (Everett Kaser) Newsgroups: comp.sys.ibm.pc Subject: Re: DOS Critical-error handler Message-ID: <1610024@hpcvlo.HP.COM> Date: Fri, 31-Jul-87 17:42:32 EDT Article-I.D.: hpcvlo.1610024 Posted: Fri Jul 31 17:42:32 1987 Date-Received: Sun, 2-Aug-87 09:48:05 EDT References: <1871@isis.UUCP> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 19 >Here is my Idea of a Critical Error Handler. It sets carry for the >int 21 caller and sets the return in AX to 100..10C for the caller to know >that a hard error occured. > >INTERRUPT_24 PROC FAR > ADD SP,6 ; Dump Dos Return > MOV BP,SP Something you should be aware of is that if you bail out of the critical error interrupt this way, (i.e. you're not returning back through DOS) you're leaving DOS in an unstable state. When this happens, the next call to DOS must be a call below (I think) about 0ch. (i.e. one of the simple console I/O routines, such as check for key.) If not, if you try doing disk I/O or something immediately after this bail-out, DOS will be confused as to what state it's in, and you may get very unwanted behaviour. Everett Kaser Hewlett-Packard Co. Corvallis, OR