Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!seismo!mcvax!vmucnam!axis!alastair From: alastair@axis.UUCP (Alastair Adamson) Newsgroups: net.micro.pc Subject: DOS Fatal Error Handling Message-ID: <500@axis.UUCP> Date: Thu, 20-Mar-86 10:38:28 EST Article-I.D.: axis.500 Posted: Thu Mar 20 10:38:28 1986 Date-Received: Sat, 22-Mar-86 23:17:32 EST Reply-To: alastair@axis.UUCP (Alastair Adamson) Organization: Axis Digital, 135 rue d'Aguesseau, Boulogne, 92100, FRANCE Lines: 17 I'm having lots of trouble trying to handle DOS fatal errors. I've written a routine in assembler and initialised the interrupt vector with its address (interrupt 24H). The routine gets called ok but either the program screws up a bit later or completely hangs. In the routine, I just restore all the user registers from the stack and do an "iret" with just the ip, cs and flags (from when I called bios) left on the stack. I also try saving the error id (from di) in a program global variable (after having restored ds) and this seems to get set ok. Alternatively, I have also tried just saving di in a variable carefully placed in the code segment, setting al to 0 and doing an iret to let dos handle the stack. The results are equally disasterous. I would greatly appreciate any hints, help or other wisdom on the subject. Thanks in advance (and I will also personally thank any responders afterwards!).