www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/05/23/00:44:40

From: bbs AT bbsipc DOT newcastle DOT edu DOT au (Bryan Beresford-Smith)
Subject: interrupts etc.
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Mon, 23 May 1994 14:07:18 +1000 (EST)

Just a short interrupt...

I got the following replies to a question about detecting keyboard key-up
events. Thanks for the replies. I have used the eventque.h mechanism
more-or-less successfully, but would like to do it more directly by
trapping both protected mode and real mode interrupts, as suggested by dj,
before passing the event on to the normal keyboard interrupt handler.

* Does someone have a simple example to demonstrate the way this is done
  (as for the timer interrupt example in the djgpp examples)?
  This would be much appreciated!
  I did have a simple INT2 0x09 interrupt handler  working with Borland C++.

* How do I do this without chaining?

* Is it necessary to use the go32_dpmi_..  function calls in djgpp to do
  this sort of stuff?

* I haven't tested it yet, but will the same methods work for writing
  hardware interrupt handlers for, say, a device using the printer interrupt
  line (Hardware interrupt 7, I think)? Will this be real mode or
  protected mode?

* Can anyone suggest a good reference for understanding PC interrupts etc.
  (especially one relevant to djgpp)? What about dpmi references?

Regards, and thanks in advance
Bryan
-------------------------------

Earlier question and replies:

From: <sandmann AT clio DOT rice DOT edu>

>  I want to detect a keyboard key up-event. I couldn't see this in grx
> mouseevent stuff or elsewhere ... am I missing something? I have
> written a 0x09 interrupt handler using _go32_dpmi_... (as per timer example)
> but it only seems to work some of the time and I would like to
> avoid this if possible.  Can anyone help me?

Try to get maint5 and use the new raw flag in the event library.  You will
have to use the eventque.h from the go32 directory (maybe merge it?).  Every
int9 should record a queue event with the new code.  Good luck.

From: <dj AT ctron DOT com>
Date: Tue, 10 May 94 08:16:12 -0400
To: bbs AT bbsipc DOT newcastle DOT edu DOT au
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: djgpp, grx, events


(1) GRX has full event handling as of maint5 (addition to go32)

(2) You need to trap both protected mode and real mode interrupts, and
*not* chain them, to trap keyboard events.



- Raw text -


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