Mail Archives: djgpp/2014/03/03/19:15:23.2
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 -