X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f NNTP-Posting-Date: Fri, 15 May 2009 13:32:29 -0500 From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp References: 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-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 64.91.192.48 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" 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 be loaded and resident, and never go away, you end up with a DOS memory footprint 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 really be clean - they can mess with the TSR state through DPMI calls without knowing 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 unlocked memory result in a page fault.