delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/24/23:15:06

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HELP: How to install interupt handler create TSR program!
Date: Sun, 24 Jun 2001 21:49:49
Organization: Aspen Technology, Inc.
Lines: 21
Message-ID: <3b36607d.sandmann@clio.rice.edu>
References: <993031558 DOT 758772 AT basic DOT maxnet DOT ru> <3942-Wed20Jun2001180850+0300-eliz AT is DOT elta DOT co DOT il>
NNTP-Posting-Host: dcloan.hou.aspentech.com
X-Trace: selma.aspentech.com 993437842 28518 10.32.115.107 (25 Jun 2001 02:57:22 GMT)
X-Complaints-To: postmaster AT aspentech DOT com
NNTP-Posting-Date: 25 Jun 2001 02:57:22 GMT
X-NewsEditor: ED-1.5.8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> You can start with the sample code in v2tk/djgpptsr.zip, available
> from the usual DJGPP sites, it shows how to do that.
> 
> Note that protected-mode TSRs need functions that are only available
> with DPMI 1.0 servers.  CWSDPMI does support those functions, but the
> DPMI server built into Windows does not.  So if you want your TSRs to
> work on anything but plain DOS, you are probably out of luck.

Actually the TSR example doesn't use any of the DPMI 1.0 functions (and
CWSDPMI doesn't support any of the 1.0 DPMI stay resident functions).
What it does is to TSR the DJGPP stub executable, which then forces 
CWSDPMI to stay resident (since it never sees a DPMI exit call, so it
just thinks all remaining DPMI usages are nested.

This has some disadvantages, like:
  the 50-70Kb which CWSDPMI requires
  any PM horrible exception can't be cleared by unloading CWSDPMI

I remember the TSR example working on at least one other DPMI, but I can't
remember now which one it was.  I wasn't sure it would be a useful example,
but you never know what clever people will do with an example :-)

- Raw text -


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