Mail Archives: djgpp/1995/08/29/01:20:38
On 28 Aug 1995 tevans AT fastlane DOT net wrote:
> I'm currently in the process of writing an interrupt handler for both the
> keyboard and the mouse. I have the protected mode version of the keyboard
> handler finished, but what I'd like to know is whether I should also have a
> real mode version of the driver.
>
> Somewhere I read that if you are running under windows, so that it uses
> Windows dpmi server, that you only need a protected mode driver. How
> about under DOS? Would it be more effecient to have both a real and
> protected mode driver for both the keyboard handler and the mouse handler?
If you are working under DJGPP v1.x, then this is all explained in the
DJGPP FAQ list (available as faq102.zip from the same place you get
DJGPP), section 18.7. It is too long to reproduce here. Short answer:
in DPMI mode (Windows or otherwise) you only need a PM handler, but in
non-DPMI modes you need both, or you will lose interrupts which happen in
real mode.
I don't think that you should worry about efficiency for mouse and
keyboard: how many interrupts can a 1200-baud serial device and a
keyboard cause? So in DPMI mode you can safely install a PM handler
alone, IMHO.
- Raw text -