Mail Archives: djgpp/2009/05/15/14:45:19

X-Authentication-Warning: mail set sender to djgpp-bounces using -f
NNTP-Posting-Date: Fri, 15 May 2009 13:32:29 -0500
From: "Charles Sandmann" <cwsdpmi AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
References: <dcff139d-32b8-4f22-ab4a-6f7e78f81324 AT c18g2000prh DOT googlegroups DOT com> <Pine DOT LNX DOT 4 DOT 60 DOT 0905150327230 DOT 1746 AT narpes DOT com> <guja2i$83o$1 AT aioe DOT org>
Subject: Re: DJGPP TSR
Date: Fri, 15 May 2009 13:32:26 -0500
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
Message-ID: <>
Lines: 35
X-Trace: sv3-wL5WqNJU1v+vQ3sf71I3zA9D9bnirMmxJnmFIv5/FWZpzsgw0vcU1srFDDplXrbFZLWaaw+QGfRPG4r!EuIbQrOJZGLZR180YtM6aLwglyyaWXpqjiJbssbzO0rJb4DdWehhKG0547fImMcjUcdY1ffrKHN+!ybMQBpsnOdg1DxC7ViBcT3aXXQuCv64=
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.39
X-Original-Bytes: 2595
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Rod Pemberton" <do_not_have AT nohavenot DOT cmm> wrote in message 
news:guja2i$83o$1 AT aioe DOT org...
> I was hoping someone could help him (and me indirectly).  I've had so many
> problems trying to create a working TSR in DJGPP that I gave up.  No 
> matter
> what I did with the locking functions, code that worked as a non-TSR would
> just not work as a TSR.  I eventually concluded that code or data 
> somewhere
> in the _go32* or _dpmi* calls wasn't able to be locked.  So, today, I just
> code TSR's in assembly...

First, ask why you need a DJGPP TSR.  Since the DPMI provider will need to 
loaded and resident, and never go away, you end up with a DOS memory 
increase of  usually 100KB+.  I did the proof of concept for someone who
needed to access around 5MB of memory from the TSR.  IIRC, the keyboard
hook was done in GAS (not with any of the wrappers).

If you load up any other DPMI apps while running the TSR, they must also 
be clean - they can mess with the TSR state through DPMI calls without 
it.  It is also another nesting layer, making it easier to overrun the 
internal DPMI
stack.  It's really a fragile environment, so if a real mode TSR works, it's 
a better
idea anyway.

Eli's suggestion on the memory flag is a good one.  I think the symptoms of 
memory result in a page fault.

- Raw text -

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