Mail Archives: djgpp/1997/04/08/04:15:40
Hardware interrupts captured in protected mode are handled in protected
mode. Hardware interrupts captured in real mode are handled in real mode.
In order to deal with all interrupts the DPMI server installs a real mode
hardware interrupt for every pmode int installed. The handler code that
is called switches to protected mode and calls the appropriate handler.
Therefore, for most applications, installing a pmode handler is
sufficient.
If you have a high interrupt frequency the time for the protected mode
switch may be too costly. In that case you need to install a second,
real mode handler to deal with the interrupt, when the machine is in real
mode, without a mode switch. Installing the real mode handler involves
allocating DOS memory for it, copying the rmode handler into the
allocated memory, and installing the real mode interrupt to point to the
handler (there's a DPMI func for this). Uninstalling the handler means
reversing these steps. Unnecessary complication - avoid it if possible.
By the way, all this is described in greater detail in the FAQ.
---------------
Peter Berdeklis
Dept. of Physics, Univ. of Toronto
- Raw text -