
437
CHAPTER 18
INTERRUPT FUNCTIONS
User’s Manual U12790EJ2V0UD
(5) Program status word (PSW)
The program status word is a register used to hold the instruction execution result and the current status of
an interrupt request. The IE flag to set maskable interrupt enable/disable and the ISP flag to control nesting
interrupt are mapped in the PSW.
Besides 8-bit unit read/write, this register can carry out operations via bit manipulation instructions and
dedicated instructions (EI and DI). When a vectored interrupt request is acknowledged, if the BRK instruction
is executed, the contents of the PSW are automatically saved into a stack and the IE flag is reset to 0. If a
maskable interrupt request is acknowledged, the contents of the priority specification flag of the acknowledged
interrupt are transferred to the ISP flag. The acknowledged interrupt is also saved into the stack by the PUSH
PSW instruction and restored from the stack by the RETI, RETB, and POP PSW instructions.
Reset input sets the PSW to 02H.
Figure 18-6. Configuration of Program Status Word
7
IE
PSW
6
Z
5
RBS1
4
AC
3
RBS0
2
0
1
ISP
0
CY
02H
After reset
ISP
0
Used when normal instruction is executed
Priority of interrupt currently being serviced
High-priority interrupt being serviced
(low-priority interrupts disabled)
1
Interrupt request not acknowledged or low-priority
interrupt being serviced
(all-maskable interrupts enabled)
IE
Enable/disable of interrupt request acknowledgment
0
Disabled
1
Enabled