Category : Modula II Source Code
Archive   : M2CMP20.ZIP
Filename : BREAK.DEF

Output of file : BREAK.DEF contained in archive : M2CMP20.ZIP

(* (C) Copyright 1987,1988 Fitted Software Tools. All rights reserved. *)

This module allows the user to trap the Ctrl-Break (vector 1BH)
interrupt and the DOS generated (vector 23H) Ctrl-C interrupt.

Upon initialization, BREAK is disabled. Ths user program must
call EnableBreak to allow processing of breaks.

The break interrupt handlers check the DOS busy flag to prevent
Ctrl-Break processing while in DOS.

The default break handler simply terminates the program (ErrorLevel 6).

DisableBreak is called before control is transfered to a user
break handler. Should the user break handler procedure return,
the program is terminated (ErrorLevel 6).

Uses: To prevent the user from terminating the program via Ctrl-Break
or Ctrl-C, just import this module.

During program testing, it is useful to include this module and
invoke EnableBreak; This allows the program to be aborted via
Ctrl-Break, even if the program goes into a loop.

PROCEDURE EnableBreak;
enable processing of BREAK.
the default break handler will terminate the program

PROCEDURE DisableBreak;
disable processing of BREAK

PROCEDURE InstallBreakHandler( breakHandler :PROC );
install procedure to gain control if a BREAK is detected.

PROCEDURE UninstallBreakHandler;
uninstall the user BREAK handler procedure

END Break.

  3 Responses to “Category : Modula II Source Code
Archive   : M2CMP20.ZIP
Filename : BREAK.DEF

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: