Article View: comp.sys.ibm.pc.programmer
Article #800Re: Avoiding ^C
From: Bruce Kahn
Date: Thu, 28 Jun 1990 14:11
Date: Thu, 28 Jun 1990 14:11
18 lines
1417 bytes
1417 bytes
In article <10688@spool.cs.wisc.edu>, so@brownie.cs.wisc.edu (Bryan So) writes: |> I have tried to trap the Ctrl-Break and Ctrl-C interrupts by |> "signal", "ctrlbrk" in Turbo C and installing my own 0x23 handler. |> But there seems to be no way to prevent "^C" from printing out to |> the screen. Can somebody explain a way to do it? Thanks. |> |> Bryan The only way that Ive found to prevent the annoying ^C from being displayed is to NOT use the standard printf calls. I found that I had to issue direct BIOS write calls and bypass DOS. The reason being (I was told a long long time ago) that DOS allows you to insert your own INT23 handler but it stil sets a 'break' flag internally and when it does any screen I/O it checks the flag; if it is set it inserts a ^C into the buffer and clears the flag. If you need more specifics I can dig out my code and tell you what exactly I did (it may have been I issued INT21, AH=10H calls myself)... Bruce (bruce@archive.rtp.dg.com)
Technical Details
Message-ID:
<577@dg.dg.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!dg!archive!bruceReferences:
<10688@spool.cs.wisc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!dg!archive!bruce From: bruce@archive.rtp.dg.com (Bruce Kahn) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: Avoiding ^C Message-ID: <577@dg.dg.com> Date: 28 Jun 90 14:11:03 GMT References: <10688@spool.cs.wisc.edu> Sender: root@dg.dg.com Reply-To: bruce@archive.rtp.dg.com (Bruce Kahn) Organization: Data General Corporation, Research Triangle Park, NC Lines: 18