[comp.sys.ibm.pc] Ctrl C Echo

cramer@optilink.UUCP (Clayton Cramer) (03/15/90)

I haven't had much luck disabling ^C echo under DOS using signal, 
while still keeping the ^C interrupt useful to my application
program.  I presume that my only real hope of disabling the built-in
^C echo is by grabbing the keyboard interrupt, and filtering out
^C at the ISR level.  Has anyone already done this?
-- 
Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer
No matter what other nations may say about the United States,
immigration is still the sincerest form of flattery.
Disclaimer?  You must be kidding!  No company would hold opinions like mine!

mccarthy@well.sf.ca.us (Patrick McCarthy) (03/16/90)

In article <3253@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes:
>
>I haven't had much luck disabling ^C echo under DOS using signal, 
>while still keeping the ^C interrupt useful to my application
>program.  I presume that my only real hope of disabling the built-in
>^C echo is by grabbing the keyboard interrupt, and filtering out
>^C at the ISR level.  Has anyone already done this?

Yes, and yes.  The general method is to filter interrupt 0x1B (the
vector called by the BIOS when CTRL-BREAK is hit), and interrupt 0x16
(the interrupt DOS invokes when it is waiting for a keystroke).
The logic in the 0x1B handler is simple (set a global variable and
return), but the logic in the 0x16 handler gets a bit wierd.
I wrote a program using a commercially available library to provide
the ISR support, but it would be real easy to convert it to the MSC
or Turbo C "interrupt" type function.  Please E-mail me if you want
details on how to get the source.

Pat McCarthy
mccarthy@well.uucp