Using General Disable and Enable Statements

You can use a general disable statement to disable all the interrupts declared by the process. Interrupts declared in other related processes, such as a parent or offspring, are not affected. While a general disable is in effect, any interrupts whose events are caused are queued for later execution.

To again enable the interrupts that were disabled by the general disable statement, use a general enable statement. For the most part, the general enable statement does not enable interrupts that were already disabled when the general disable statement was entered. However, if a statement enables a specific interrupt while a general disable statement is in effect, then the general enable statement also enables that interrupt.

The following ALGOL statements illustrate the interaction of specific and general enables and disables for three interrupts, INT1, INT2, and INT3:

ENABLE INT1;   % Enables INT1.
DISABLE INT2;  % Disables INT2.
DISABLE INT3;  % Disables INT3.
DISABLE;       % Disables INT1.  INT2 and INT3 remain disabled.
ENABLE INT2;   % All three events remain disabled.
ENABLE;        % Enables INT1 and INT2.  INT3 remains disabled.

The following are the general disable and enable statements in COBOL:

DISALLOW INTERRUPT.
ALLOW INTERRUPT.