Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!well!mccarthy From: mccarthy@well.sf.ca.us (Patrick McCarthy) Newsgroups: comp.sys.ibm.pc Subject: Re: Ctrl C Echo Message-ID: <16717@well.sf.ca.us> Date: 16 Mar 90 04:15:03 GMT References: <3253@optilink.UUCP> Reply-To: mccarthy@well.UUCP (Patrick McCarthy) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 20 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