Article View: alt.msdos.programmer
Article #330Old dos keyboard int interfering?
From: 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
Technical Details
Message-ID:
<1992Aug27.063306.13226@colorado.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!boulder!alumni.cs.colorado.edu!boggsShow Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!boulder!alumni.cs.colorado.edu!boggs From: boggs@alumni.cs.colorado.edu (Adam Boggs) Subject: Old dos keyboard int interfering? Message-ID: <1992Aug27.063306.13226@colorado.edu> Sender: news@colorado.edu (The Daily Planet) Nntp-Posting-Host: alumni.cs.colorado.edu Organization: University of Colorado, Boulder Date: Thu, 27 Aug 1992 06:33:06 GMT Lines: 45