TIP: Click on subject to list as thread! ANSI
echo: z3_pascal
to: Eric Tam
from: Doug Brendish
date: 1996-06-27 20:50:16
subject: Disable Ctrl-Break

ET> This message was written at 11:25a on 06-25-1996.

ET> Hi All,
ET>     How can I fully disable the Ctrl-Break in Pascal?

You have to grab the interrupt for ctrl-break, interrupt $1B, point it at a
procedure that does what you want. In your case nothing.
eg:

Procedure My_Break;Interrupt;
Begin
end;  {Does absolutely nil}

Var
 Real_Break:pointer;

Begin
 getint($1B, real_break); {Get pointer to the old interrupt}
 setint($1B, {at}My_Break);  {Set the interrupt to a procedure}
 Do_whatever_you_want_here;
 setint($1B,Real_Break) ; {Don't forget to reset it before you exit}
end.

If you wanted to make a TSR that would disable ctl-break always you could
leave out the setint($1B, Real_Break); replace it with KEEP and have no
Do_Whatever_etc, reduce the amount of mem it can use by putting {$M
$2000,0,0} at the top of the program. That would make a little tsr prog
that would kill the control-break for everything run after you load it.

Doug

--- Msgedsq/2 3.10
* Origin: Tir na nOc 066 245944 -=Cead mile failte=- (3:626/667)
SEEN-BY: 633/267 270
@PATH: 626/667 660 711/401 808 50/99 635/544 727 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.