[comp.sys.ibm.pc.programmer] Disabling CTRL-C, in Turbo-C - not via TSR.

mazz@jupiter.newcastle.edu.au (Richard Mazzaferri) (04/10/91)

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.
-----------------------------------------------------------------