delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/15/03:00:27

Date: Mon, 15 Jun 1998 10:00:01 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>,
Jan Humme <info AT imedia-engineering DOT nl>
cc: djgpp AT delorie DOT com
Subject: Re: How do I gracefully terminate my TSR application?
In-Reply-To: <3583a440.sandmann@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.980615095825.9030M-100000@is>
MIME-Version: 1.0

On Sun, 14 Jun 1998, Charles Sandmann wrote:

> For a DOS TSR to go away, you need to unhook all interrupts and deallocate the
> memory.  Don't call 0x31 again, just free the DOS PSP and environment (cwsdpmi
> does this for it's own image).  Unwinding the DPMI image is a more difficult -
> you need to do an exit() call which frees the DPMI memory, frees the selectors,
> etc.  There must not be another DPMI image running "nested" under the TSR -
> the signal for it to exit must come from a real mode program.
> 
> Reading the paragraph above - hummm - yes it's possible but very complicated.
> It may even be a bit different under different DPMI providers.  

In that case, maybe it is better to not uninstall the TSR at all, only
make it transparent (i.e., every interrupt is just passed to the previous 
handler in the chain).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019