[net.micro.pc] How do I disable <CTRL-BRK>?

goldberg@uiucdcs.Uiuc.ARPA (06/28/85)

What is the best way to completely disable <ctrl-break>/<ctrl-C> on the IBM-PC?
I have tried setting the int 23h vector to point to an IRET instruction, but
the DOS still echoes ^C, which is annoying.  Any suggestions greatly 
appreciated.  Please mail replies, I will summarize if enough interest is
generated.  Apologies if this has been covered before.  Thanks.

				Phil Goldberg
				goldberg@Uiuc
			   goldberg%Uiuc@csnet.ARPA
		  ...!{ihnp4,convex,pur-ee}!uiucdcs!goldberg

norcott@cca.UUCP (Bill Norcott) (07/08/85)

> 
> What is the best way to completely disable <ctrl-break>/<ctrl-C> on the IBM-PC?
> I have tried setting the int 23h vector to point to an IRET instruction, but
> the DOS still echoes ^C, which is annoying.  Any suggestions greatly 
> appreciated.  Please mail replies, I will summarize if enough interest is
> generated.  Apologies if this has been covered before.  Thanks.
> 
> 				Phil Goldberg
> 				goldberg@Uiuc
> 			   goldberg%Uiuc@csnet.ARPA
> 		  ...!{ihnp4,convex,pur-ee}!uiucdcs!goldberg

*** REPLACE THIS LINE WITH YOUR MESSAGE ***
	Here is the code to disable the CTRL-BREAK interrupt:

	call by INT 21H
	REG AH = 33H ( get or set CTRL-BRK)
	REG AL = 0 for get, 1 for put (set it to 1)
	REG DL = 0 for OFF, 1 for ON  (set it to 0)
	On return:
		DL = 0 if BREAK=OFF, or 1 if BREAK=ON

Sincerely,
Bill Norcott
Computer Corp. of America

P.S.	thanks to Ross Greenberg for donating his interrupts list to USERNET

bishop@ecsvax.UUCP (Alan Bishop) (07/09/85)

In article <3201@cca.UUCP> norcott@cca.UUCP (Bill Norcott) writes:
>	Here is the code to disable the CTRL-BREAK interrupt:
>
>	call by INT 21H
>	REG AH = 33H ( get or set CTRL-BRK)
>	REG AL = 0 for get, 1 for put (set it to 1)
>	REG DL = 0 for OFF, 1 for ON  (set it to 0)
>	On return:
>		DL = 0 if BREAK=OFF, or 1 if BREAK=ON

This is not for turning CTRL-BREAK on and off in the same sense that
redirecting the interrupt does.  This only turns extended-break checking
off, which is the default.  Extended-break checking checks for Ctrl-Break
during most INT 21H calls, while having it off only checks during certain
ones (keyboard read, write, etc.).

Concerning the original request for Ctrl-Break trapping software,
I don't have any.  You might want to look at INT 1BH, as shown in
the Tech. Ref. manual, which is the lowest level Ctrl-Break catch.
Unfortunately, several programs change it, so you'd have to keep up
with changing it.
 
-- 

				Alan Bishop
			     ...!{decvax,akgua}!mcnc!ecsvax!bishop

lauren@vortex.UUCP (Lauren Weinstein) (07/09/85)

Is it documented?  Would it be sure to work with compatibles?

--Lauren--

caf@omen.UUCP (Chuck Forsberg WA7KGX) (07/11/85)

I had the same problem of DOS echoing ^C on Ctrl-Break even tho I'd
reassigned the break handler vector.  The solution is to use the
ROM BIOS calls for the kayboard rather than DOS calls.

Using the ROM BIOS keyboard calls gets around the ^C echo and bypasses any
key redefinitions in ANSI.SYS.  Key redefinitions by other programs such as
Poly Windows, FANSI-Concole, etc. may still be effective.

-- 
  Chuck Forsberg WA7KGX   ...!tektronix!reed!omen!caf   CIS:70715,131
Omen Technology Inc     17505-V NW Sauvie Island Road Portland OR 97231
Voice: 503-621-3406     Modem: 503-621-3746 (Hit CR's for speed detect)
Home of Professional-YAM, the most powerful COMM program for the IBM PC