<ACPS2924@Ryerson.CA> (01/13/91)
OK this is my problem, I'm writing an event manager in Turbo C++(1.00) and need to capture the users keystrokes as soon as they occur. I figured the best place would be to write an extension to INT9. My extension calls the old INT9 and then INT16 to get the keystroke. Lo and behold the system hangs. Any suggestions,code fragments or even assembly would help. I'm not really up to rewriting the INT9 handler, assembler is only mediocre... I've read that INT9 calls INT15 as a hook but that this is of no practical value because of INT21 problems, the hook may never get called. Any suggestions as how to write this interrupt routine, or guidelines in general about writing interrupts, general do's and don'ts. Peter ACPS2924@ryerson.ca
jvb7u@Virginia.EDU (Jon Brinkmann) (01/23/91)
In article <91013.021258ACPS2924@Ryerson.Ca> ACPS2924@Ryerson.Ca writes:
#OK,
#
#This is what I would like to do, I'm writing an event manager to capture
#key strokes from the user. I figure best place is to write an extension to
#INT9 when the user hits a key.
That's fine. I assume you are using MicroSoft C 5.1 or 6.0. There is an
EXCELLENT article on writing TSRs in C in the MicroSoft Systems Journal:
Christian, Kaare, "Using MicroSoft C Version 5.1 to Write
Terminate-and-Stay-Resident Programs", MicroSoft Systems
Journal, September 1988, Volume 3, Number 5, pages 47 - 57.
The source-code examples are available from SIMTEL in the file:
PD1:<MSDOS.MSJOURNAL>MSJV3-5.ARC
One of the examples is a popup clock that uses <CTRL>W as the "hot key".
Jon
--
Jon Brinkmann Astronomy Department
Internet: jvb7u@Virginia.EDU University of Virginia
UUCP: ...!uunet!virginia!jvb7u P.O. Box 3818
SPAN/HEPnet: 6654::jvb7u Charlottesville, VA 22903-0818