Xref: news2.mv.net comp.os.msdos.djgpp:1329 From: jtsilla AT ccs DOT neu DOT edu (James Tsillas) Newsgroups: comp.os.msdos.djgpp Subject: In stalling protected mode ISR Date: 22 Feb 1996 17:50:08 GMT Organization: Northeastern University Lines: 39 Distribution: world Message-ID: NNTP-Posting-Host: everest.ccs.neu.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Dear DJGPP'ers, I am writing a program which needs to intercept keyboard interrupts. I'd like this program to work under all DPMI servers (even Windows based). I suspect I need to chain the existing interrupt handler with my new p-mode handler. After some research I found a technique where I can allocate a real mode callback and set it to my handler function. This should work but I can see no way to chain the handlers such that the system handler also gets to run. I see there is a dpmi function to get the existing handler and I can see how to set the handler to my callback. Is there a way that I can have my callback switch back to real mode and call the system ISR? The ISR is for the keyboard interrupt and is supposed to catch all keyevents to maintain an in-memory keymap. My application can then poll the keymap at any given time to check if a given key is pressed. I can probably simulate the function by having some sort of non-blocking getchar() in an event loop. But I am curious to see if I can get it to work via the ISR. thanks for your kind help, -Jim. -- ____***___ \..*...*./ \.*..../ \*...* * Jim Tsillas - Senior Software Engineer * \**/ * Cascade Communications Corp. * \/ * 5 Carlisle Road, Westford MA 01886 * CASCADE