Thread View: comp.windows.ms.programmer
3 messages
3 total messages
Started by Klaus Malorny
Fri, 10 Apr 1992 16:51
Help: Software Interrupts in Protected Mode?
Author: Klaus Malorny
Date: Fri, 10 Apr 1992 16:51
Date: Fri, 10 Apr 1992 16:51
32 lines
1999 bytes
1999 bytes
Hi,
I'm currently writing an application with MSC & Windows SDK that communicates
with a TSR-based hardware driver. The TSR writes its data in a shared memory
provided by my application via "GlobalDOSAlloc". To perform functions provided
by TSR one have to use a certain software interrupt. I did this by using the
library function "int86" and for that case it works well.
But some of the functions of the TSR expect an address to the shared memory
with the segment part of the address in the "es" register. My attempt
was to use the "int86x" function with the "es" register set to the real
mode segment address of the shared memory (as the TSR is executed in real
mode). The result was an UAE, as the library function "int86x" (still running
in protected mode) tries to setup the "es" register with a segment address.
When using a valid selector in the "es" register, the TSR is called, but with
modified contents of the "es" register.
Well, I do know that things are complicated in proctected mode, but I thought
it would work because the int86 functions are still available in dos.h (in
contrast to e.g. _dos_setvect, which is "removed" by #ifndef _WINDOWS etc.).
Maybe I misused a facility provided to process hardware interrupts ? ;-)
MY QUESTION IS: is there an *easy* way to call a software interrupt of a TSR
by a protected mode Windows application (with the ability to
set all registers (execpt ss,sp,cs,ip of course!:-)) ???
Perhaps DPMI does the job, but as the documentation of Windows SDK doesn't
contain anything about it, I am rather unfamiliar with it.
Thanks in advance
Klaus
Re: Help: Software Interrupts in Protected Mode?
Author: Peter Haller
Date: Sat, 11 Apr 1992 12:22
Date: Sat, 11 Apr 1992 12:22
47 lines
2888 bytes
2888 bytes
In a previous article, klaus@knipp.en.open.de (Klaus Malorny) says: > >Hi, > >I'm currently writing an application with MSC & Windows SDK that communicates >with a TSR-based hardware driver. The TSR writes its data in a shared memory >provided by my application via "GlobalDOSAlloc". To perform functions provided >by TSR one have to use a certain software interrupt. I did this by using the >library function "int86" and for that case it works well. >But some of the functions of the TSR expect an address to the shared memory >with the segment part of the address in the "es" register. My attempt >was to use the "int86x" function with the "es" register set to the real >mode segment address of the shared memory (as the TSR is executed in real >mode). The result was an UAE, as the library function "int86x" (still running >in protected mode) tries to setup the "es" register with a segment address. >When using a valid selector in the "es" register, the TSR is called, but with >modified contents of the "es" register. > >Well, I do know that things are complicated in proctected mode, but I thought >it would work because the int86 functions are still available in dos.h (in >contrast to e.g. _dos_setvect, which is "removed" by #ifndef _WINDOWS etc.). >Maybe I misused a facility provided to process hardware interrupts ? ;-) > >MY QUESTION IS: is there an *easy* way to call a software interrupt of a TSR > by a protected mode Windows application (with the ability to > set all registers (execpt ss,sp,cs,ip of course!:-)) ??? > >Perhaps DPMI does the job, but as the documentation of Windows SDK doesn't >contain anything about it, I am rather unfamiliar with it. > >Thanks in advance > > Klaus > I would suggest you get the DPMI specs (1.0) from Intel. They are free. Also get your hands on a copy of "Writing Windows Device Drivers" by Daniel Norton. This book covers much of the Protected Mode interface to DOS and the Virtual Machine handling of interrupts. PCH -- Peter C. Haller | 'If you do what you Imagination Processing Systems | have always done, aa596@cleveland.Freenet.Edu | expect what you have "Are we having fun yet?" | always recieved.'
Re: Help: Software Interrupts in Protected Mode?
Author: Richard Hancock
Date: Tue, 14 Apr 1992 16:39
Date: Tue, 14 Apr 1992 16:39
6 lines
756 bytes
756 bytes
/ hpopd:comp.windows.ms.programmer / aa596@cleveland.Freenet.Edu (Peter Haller) / 1:22 pm Apr 11, 1992 / >[stuff deleted] >I would suggest you get the DPMI specs (1.0) from Intel... A minor point :- doesn't Windows implement the 0.9 spec?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads