home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!wa4mei!nanovx!mycro!scott
- From: scott@mycro.UUCP (Scott C. Sadow)
- Newsgroups: comp.os.msdos.programmer,connect.audit
- Subject: Re: REQUEST FOR INFO: DISABLING ^C
- Summary: How do you disable the ^C handling?
- Message-ID: <1992Jul23.091344@mycro.UUCP>
- Date: 23 Jul 92 13:13:44 GMT
- References: <1992Jul20.124824.2971@ibmpcug.co.uk>
- Lines: 23
-
- In article <1992Jul20.124824.2971@ibmpcug.co.uk>, fredc@ibmpcug.co.uk (Fred Curtis) writes:
- >I want to disable the ^C interrupt. I can trap it and ignore it
- >by reseting the DOS interrupt vector, but it still prints "^C" on
- >the screen.
-
-
- The best way I have found of doing this is to create a small interrupt
- handler that just sets a flag. Then set interrupt vector 1BH to this
- routine. (1BH is the BIOS ctrl-break handler) I also set interrupt vector
- 23H to this same routine, or slightly different. (23H is the DOS
- ctrl-c/ctrl-break handler)
-
- Oh yes - make sure you save both vectors before changing them and restore
- them before your programs ends.
-
- (By the way, I have done this also for interrupt vector 5, which is print
- screen. Then I can check the global variable and, if set, print the
- graphics screen.)
-
-
- Scott C. Sadow
- scott@mycro.UUCP
- ...gatech!nanovx!mycro!scott
-