delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/03/23:46:23

From: firewind <firewind AT metroid DOT dyn DOT ml DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Taking over the keyboard interrupt
Date: 4 Nov 1997 01:39:10 GMT
Organization: Netcom
Lines: 32
Message-ID: <63lubu$qqe@dfw-ixnews8.ix.netcom.com>
References: <345e4bb9 DOT 2352163 AT news DOT demon DOT co DOT uk>
NNTP-Posting-Host: elp-tx2-04.ix.netcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Sam. <sam AT greenaum DOT demon DOT co DOT ARSE!ARSE!ARSE!uk> wrote:
> I'd like to know how to take over the keyboard interrupt, I want
> better access to the individual scancodes. I've read MKKBD, but it's
> in ASM which is beyond me, and also the Allegro source which isn't
> ideal because the relevant code is spread over a few files and it
> isn't obvious what's what, and I'm still only learning C.

> Is there a tutorial anywhere, explaining step by step what to do, in
> fairly plain C? It doesn't have to be efficient or useful, just a
> minimum to illustrate the point of how to install and deinstall an
> interrupt and how to lock the right memory.

Its not a tutorial, but some time ago I wrote (but never published) a program
called Worx and a companion program WorxTSR that demonstrate how to hook
and use the keyboard interrupt (INT 0x09). The non-TSR version is very meat
and potatoes, and I haven't touched it in -quite- some time. The TSR version
has been worked on much more recently, and the only bugs are that strenuous
memory usage can sometimes cause the RMCB to seg fault.

In case you're interested, it is availible at:

http://metroid.dyn.ml.org/worx/

One final note, the readme file isn't up-to-date... lmove.o isn't used anymore,
IIRC.

-- 
[-                               firewind                                   -]
[-   email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work)  -]
[-          "You're just jealous because the voices talk to -me-."          -]
[-                   Have a good day, and enjoy your C.		            -]
[-          (on a crusade of grumpiness where grumpiness is due)            -]

- Raw text -


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