| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Disable Ctrl-Break |
ET> How can I fully disable the Ctrl-Break in Pascal?
DB> You have to grab the interrupt for ctrl-break, interrupt
DB> $1B, point it at a procedure that does what you want. In
DB> your case nothing.
DB> eg:
DB> Procedure My_Break;Interrupt;
DB> Begin
DB> end; {Does absolutely nil}
Of course, you could always use it to set some global variable, such as
CtlBreakPressed := true, or such, which is easy to test per some loop.
DB> getint($1B, real_break); {Get pointer to the old interrupt}
DB> setint($1B, {at}My_Break); {Set the interrupt to a procedure}
DB> Do_whatever_you_want_here;
DB> setint($1B,Real_Break) ; {Don't forget to reset it before you exit}
Indeed! This suggests maybe setting up an ExitProc for safety, too.
PS: thanks for the VP demo. Not half bad, eh? I've only played with the
examples so far, but am quite impressed. I should check SpeedPascal too ..
Cheers, Ian
--- MaltEd 1.0.b5
* Origin: Magic Puddin' BBS Nimbin 066-89-1843 V.32bis/V.42 (3:626/660)SEEN-BY: 633/267 270 @PATH: 626/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™.