www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2014/03/03/19:15:23.2

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <dont_use_email AT xnothavet DOT cqm>
Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: resident service providers
Date: Mon, 03 Mar 2014 18:59:47 -0500
Organization: Aioe.org NNTP Server
Lines: 39
Message-ID: <op.xb57lxn66zenlw@localhost>
References: <op DOT xblne4gx5zc71u AT localhost> <le723e$mg6$1 AT speranza DOT aioe DOT org>
<op DOT xbm2ilql5zc71u AT localhost>
<CAB9Rao_HV2RwMsdo9Gq0TYHLdU4XHHm9JxjgKjmEE9X3ATLWfw AT mail DOT gmail DOT com>
<op DOT xbneq4yo5zc71u AT localhost>
NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org
Mime-Version: 1.0
X-Complaints-To: abuse AT aioe DOT org
User-Agent: Opera Mail/12.16 (Linux)
X-Notice: Filtered by postfilter v. 0.8.2
Bytes: 2452
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Fri, 21 Feb 2014 15:19:42 -0500, Rod Pemberton  
<dont_use_email AT xnohavenotit DOT cnm> wrote:

[from c.o.m.d. only replies to the thread]

> [...]
> So, that likely means I have an error in the assembly for the
> PM TSR somewhere.
>

Well, I made a few mistakes with the assembly PM TSR using DPMI:

1) I was switching to 32-bit PM when 16-bit PM was sufficient.

2) I used the DPMI's 16-bit PM CS for my interrupt's code selector.
I needed a 32-bit PM code selector for the interrupt.

3) I was attempting to stay resident by trapping Int 0x21, AH=4Ch
instead of calling the TSR interrupt ...  The TSR interrupt can be
called in PM and will be reflected to 16-bit RM.

Now, the TSR installs a PM interrupt.  I can call the PM interrupt.
However, I have an issue with exiting the interrupt.  An 'iret'
causes a stack fault in the DPMI host (CWSDPMI for DJGPP), while
a jump to the DPMI hosts original PM interrupt causes a reboot,
which is likely a triple fault.  This is probably covered in
the DPMI documentation somewhere.  But, the basics work!

> Thanks for reminding me of that TSR.  I might be able to use a
> modified version of the DJGPP C TSR code to help me test.
>

Well, I haven't used it yet.  I found TSR's in C with DJGPP to be
a pain some years ago and I haven't decided whether I want to
revisit the issue or not.  Of course, 16-bit DPMI in assembly
isn't exactly pleasant.


Rod Pemberton

- Raw text -


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