Article View: comp.sys.ibm.pc.programmer
Article #1153Disabling CTRL-C, in Turbo-C - not via TSR.
From: Richard Mazzaferri
Date: Wed, 10 Apr 1991 13:44
Date: Wed, 10 Apr 1991 13:44
25 lines
2011 bytes
2011 bytes
I've posted this question before, but I don't think it made it out there.
I'm developing an application which runs in EGA graphics mode, and also
requires that CTRL-BREAK be used by the user to interrupt ( via my INT 0x24
handler ) when required. This works well, except that CTRL-C also causes
the handler to be invoked, _BUT_ prints the characters "^C" to something
like stdout or stderr before doing so.
Now, I don't care whether or not CTRL-C invokes INT 0x24 as long as my
screen _doesn't get corrupted_ ! To this end I have ANSI.SYS redefine
CTRL-C to the SPACE character, which works - but I need my application
to do this, as requiring the user to modify their ANSI.SYS settings is
plainly unfriendly. Obviously, somewhere, it is possible to do this,
but I haven't discovered how to do it yet. Capturing INT 0x1B doesn't
help. Do I have to write my own interrupt handler for low level keyboard
operations ( something like INT 0x09, if I remember the numbers correctly )
or is there a simpler way? If anyone can give me details I'd greatly
appreciate it.
Mazz.
--
-----------------------------------------------------------------
Richard Mazzaferri, Comp.Sc. Ph.D. student, Uni. of Newcastle,
Ph (049) 602574 mazz@nucs.newcastle.edu.au Australia.
-----------------------------------------------------------------
Technical Details
Message-ID:
<mazz.671291088@jupiter.newcastle.edu.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!munnari.oz.au!metro!seagoon.newcastle.edu.au!jupiter.newcastle.edu.au!mazzShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!munnari.oz.au!metro!seagoon.newcastle.edu.au!jupiter.newcastle.edu.au!mazz From: mazz@jupiter.newcastle.edu.au (Richard Mazzaferri) Newsgroups: comp.sys.ibm.pc.programmer Subject: Disabling CTRL-C, in Turbo-C - not via TSR. Summary: ANSI.SYS can redefine CTRL-C to SPACE, say, but how do I do so ? Keywords: Eat CTRL-C, not CTRL-BREAK Message-ID: <mazz.671291088@jupiter.newcastle.edu.au> Date: 10 Apr 91 13:44:48 GMT Sender: news@neddy.newcastle.edu.au Distribution: comp Organization: Uni of Newcastle, Australia Lines: 25