www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/29/01:20:38

Date: Tue, 29 Aug 1995 06:58:56 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: tevans AT fastlane DOT net
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Real and Protected mode drivers?

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019