Re: Real mode int from protected mode and back
- From: "Jason Burgon" <spamtrap@xxxxxxxxxx>
- Date: Sun, 24 Feb 2008 21:09:52 GMT
"gerotica" <spamtrap@xxxxxxxxxx> wrote in message
news:626c3cf9-1377-432f-a19d-92c9c313f7c4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am saying i can use the buffer i get from int 31h 100h... ***, i
really have to know more about PM...
If it's only your R/M ISR that's doing the file I/O, then don't need or want
to go through the DPMI server. Your R/M can just be a normal R/M TSR that
doesn't even know what "DPMI" stands for, let alone what it is.
Now I think I get it.. If I want ax = 0xaa in my ISR I have to write
0xaa in the ax registers structure location... not eax...
Yes. :-)
However, it's just occured to me that if you're not passing any pointers to
your R/M TSR, then instead of invoking it via int 31h/300h, you will almost
certainly be able to invoke it simply by executing an "int 61h" instruction
in the patched DPMI application. In this case you don't need a Registers
structure and the patched code *does* need to set AX, DX or whatever
registers your TSR expects to be defined (but you can't pass anything in
segment regs). In this case, the DPMI host will (almost certainly) reflect
the P/M int 61h (that your patched code generated) into a R/M int 61h that
your TSR has hooked. Your TSR will then be invoked with the register values
that EAX..EDX contained when the patch code executed its "int 61h"
instruction.
So:
(1) Write your TSR as a bog-standard R/M DOS TSR, hooking int 61h.
(2) Patch the 32-bit DPMI application so that it sets up AX and DX and
executes an "int 61h" in all the appropriate places.
(3) Install your TSR.
(4) Run the patched DPMI program.
And Bob's your uncle, Fanny's your aunt, you should have it!
--
Jay
Jason Burgon - author of Graphic Vision
http://homepage.ntlworld.com/gvision
.
- Follow-Ups:
- Re: Real mode int from protected mode and back
- From: gerotica
- Re: Real mode int from protected mode and back
- References:
- Real mode int from protected mode and back
- From: gerotica
- Re: Real mode int from protected mode and back
- From: Tim Roberts
- Re: Real mode int from protected mode and back
- From: gerotica
- Re: Real mode int from protected mode and back
- From: Tim Roberts
- Re: Real mode int from protected mode and back
- From: gerotica
- Re: Real mode int from protected mode and back
- From: Jason Burgon
- Re: Real mode int from protected mode and back
- From: gerotica
- Re: Real mode int from protected mode and back
- From: Jason Burgon
- Re: Real mode int from protected mode and back
- From: gerotica
- Real mode int from protected mode and back
- Prev by Date: Re: Real mode int from protected mode and back
- Next by Date: Re: Disk I/O, BIOS, dosemu, FreeDOS, linux host with Virtual Machines
- Previous by thread: Re: Real mode int from protected mode and back
- Next by thread: Re: Real mode int from protected mode and back
- Index(es):