CPM1/CPM1A Interrupt Functions
2-3-3 Masking All Interrupts
Masking Interrupts
Program Example
When input 00003 (interrupt no. 0) goes ON 10 times, operation moves immedi-
ately to the interrupt program with subroutine number 000. The following table
shows where the counters' set values and present values –1 are stored. Inputs
for DM 6628 have been set to 0001.
Interrupt
Input 00003 (input interrupt 0)
Input 00004 (input interrupt 1)
Input 00005 (input interrupt 2)
Input 00006 (input interrupt 3)
25315 First Cycle Flag
ON for 1 cycle
MOV(21)
@INT(89)
SBN(92)
RET(93)
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 individual 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 interrupt
routines.
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.
Word containing
Word containing
SV
SR 240
SR 244
SR 241
SR 245
SR 242
SR 246
SR 243
SR 247
#000A
Sets the SV to 10. (0000 to FFFF)
240
Word containing the SV (SR 240)
Refresh counter SVs.
003
000
#000E
Refreshes the SV of 00003 (interrupt input 0) only.
000
Interrupt program
(@)INT(89)
100
000
000
Section
2-3
PV–1
83
Need help?
Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?
Questions and answers