44
CQM1 Interrupt Functions Section 1-5
When the program is executed, operation will be as shown in the following
diagram.
Note 1. The counter will continue operating even while the interrupt routine is being
executed.
2. The input interrupt will remained masked.
1-5-3 Masking All Interrupts
All interrupts, including input interrupts, interval timer interrupts, and high-
speed counter interrupts, can be masked and unmasked as a group by means
of the INT(89) instruction. The mask is in addition to any masks on the individ-
ual types of interrupts. Furthermore, clearing the masks for all interrupts does
not clear the masks on the individual types of interrupts, but restores them to
the masked conditions that existed before INT(89) was executed to mask
them as a group.
Do not use INT(89) to mask interrupts unless it is necessary to temporarily
mask all interrupts and always use INT(89) instructions in pairs to do so, using
the first INT(89) instruction to mask and the second one to unmask interrupts.
INT(89) cannot be used to mask and unmask all interrupts from within inter-
rupt routines.
Masking Interrupts Use the INT(89) instruction to disable all interrupts.
If an interrupt is generated while interrupts are masked, interrupt processing
will not be executed but the interrupt will be recorded for the input, interval
timer, and high-speed counter interrupts. The interrupts will then be serviced
as soon as interrupts are unmasked.
Unmasking Interrupts Use the INT(89) instruction to unmask interrupts as follows:
00000
00001
00100
Subroutine 000
Subroutine 001
(see note 1) (see note 1)
(see note 2)
10 counts 10 counts 20 counts
(@)INT(89)
100
000
000
(@)INT(89)
200
000
000