dos_compilers/Logitech Modula-2 v1.1/BREAK.DEF
2024-06-30 15:43:04 -07:00

71 lines
1.8 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(* Version 1.10, Nov 1984 *)
DEFINITION MODULE Break;
(*
Handling of the ctrl-break interrupt
This module provides an interrupt handler for the
ctrl-break interrupt 1BH of MS-DOS and PC-DOS. It
installs a default break handler, which stops the
execution of the current program with 'Terminate(stopped)'
(see module 'System'). This produces a memory dump of the
stopped program. A program may install its own break
handler, and it can enable or disable the break handler
which is currently installed.
*)
EXPORT QUALIFIED
EnableBreak, DisableBreak, InstallBreak, UnInstallBreak;
PROCEDURE EnableBreak;
(*
- Enable the activation of the current break handler
If a ctrl-break is detected, the currently installed break
handler will be called.
*)
PROCEDURE DisableBreak;
(*
- Disable the activation of the current break handler
If a ctrl-break is detected, no action takes place. The
ctrl-break is ignored.
*)
PROCEDURE InstallBreak (BreakProc: PROC );
(*
- Install a break handler
in: BreakProc break procedure to be called upon
crtl-break
A program can install its own break handler. Module
'Break' maintains a stack of break procedures. The break
procedure on top of the stack (i.e. the one which was
installed most recently) will be called upon the
occurence of a ctrl-break. The default break handler
which is installed initially terminates the program with
a call to 'System.Terminate(stopped)'.
Up to four user defined break procedure may be installed
at the same time.
*)
PROCEDURE UnInstallBreak;
(*
- Uninstall the current break handler
Removes the break procedure which is currently on top of
the stack. So the last installed break procedure will be
deactivated, and the one installed previously becomes
active again.
*)
END Break.