
<
2
.75
7UGT U/CPWCN
=L/2*
+PVGTTWRVU
7/<:
Interrupt Mask Register (IMASK) Initialization
The
IMASK
register individually or globally enables or disables the interrupts (see Figure 4-4). When bits
0
through bit
6
are set to
1
, the corresponding interrupt requests are enabled. The
IMASK2
register, bits 0
through 7, enable and disable
IRQ7
through
IRQ14
, respectively. Bit
7
is the master enable bit and must be
set before any of the individual interrupt requests can be recognized. Resetting bit
7
disables all the interrupt
requests. Bit
7
is set and reset by the
EI
and
DI
instructions. It is automatically set to 0 during an interrupt
service routine and set to 1 following the execution of an Interrupt Return (
IRET
) instruction. The
IMASK
registers are reset to
00H
, disabling all interrupts.
NOTE:
1.
It is not good programming practice to directly aqssign a value to the master enable bit. A value
change should always be accomplished by issuing the
EI
and
DI
instructions.
2.
Care should be taken not to set or clear
IMASK
bits while the master enable is set.