Thread View: alt.msdos.programmer
1 messages
1 total messages
Started by Adam Boggs
Thu, 27 Aug 1992 06:33
Old dos keyboard int interfering?
Author: Adam Boggs
Date: Thu, 27 Aug 1992 06:33
Date: Thu, 27 Aug 1992 06:33
44 lines
2149 bytes
2149 bytes
I believe I've posted this once before a long time ago, but didn't get any
replies. Now that we're on the subject of keyboard interrupts, I thought I'd
ask again.
I am writing my own BBS package, and grab the keyboard interrupt to re-direct
the input to my own buffers, where I parse it with my own routines. Some of
the characters, however, I check for inside the interrupt, and set status
flage appropriatly. My problem is that some of the characters (^S and ^P)
don't seem to get passed to my interrupt. ^S just crashes my system, and
^P tries to output to the printer after I exit the program. (I am aware that
^S is pause and ^P turns on the printer). Anyway, my assumption is that DOS
(or my shell? I'm using NDOS) captures these. Can I avoid that... Here's
basically what my code looks like:
void far interrupt comint()
{
(*OldKeyVec) ();
if (kbhit()) {
inchar = bioskey(0);
switch (inchar) {
case XOFF: ...
break;
case '\x10': ... /* ^P */
break;
}
}
outp(0x20, 0x20); /* Hardware int exit routine */
}
There are other keys that are compared, but they all seem to work except
for ^S and ^P. I call (*OldKeyVec)() at the beginning because it changes
the keyboard scan codes to ascii for me (an presumably does something with
my problem characters). Another possibility is that bioskey() messes it
up. (I'm using TC++ 1.0)
So, basically, do I need to write something myself that manages the scan codes,
and get rid of (*OldKeyVec)()? How would I do that if so?
Thanks in advance for any help...
-Adam Boggs
boggs@alumni.cs.colorado.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads