
240
CHAPTER 16 INTERRUPT FUNCTION
User’s Manual U15017EJ2V0UD
16.2 Interrupt Service Modes
There are three
μ
PD784975A interrupt service modes, as follows.
Vectored interrupt service
Macro service
Context switching
16.2.1 Vectored interrupt service
When an interrupt is acknowledged, the program counter (PC) and program status word (PSW) are automatically
saved to the stack, a branch is made to the address indicated by the data stored in the vector table, and the interrupt
service routine is executed.
16.2.2 Macro service
When an interrupt is acknowledged, CPU execution is temporarily suspended and a data transfer is performed
by hardware. Since macro service is performed without the intermediation of the CPU, it is not necessary to save
or restore CPU statuses such as the program counter (PC) and program status word (PSW) contents. This is therefore
very effective in improving the CPU service time (refer to
16.8 Macro Service Function
).
16.2.3 Context switching
When an interrupt is acknowledged, the prescribed register bank is selected by hardware, a branch is made to
a pre-set vector address in the register bank, and at the same time the current program counter (PC) and program
status word (PSW) are saved in the register bank (refer to
16.4.2 BRKCS instruction software interrupt (software
context switching) acknowledgment operation
and
16.7.2 Context switching
).
Remark
“Context” refers to the CPU registers that can be accessed by a program while that program is being
executed. These registers include general registers, the program counter (PC), program status word
(PSW), and stack pointer (SP).