
160
CHAPTER 6 INTERRUPTS
MB90560 series
6.9
Stack Operations for Interrupt Processing
Once an interrupt is accepted, the contents of the dedicated registers are automatically
saved to the system stack before a branch to interrupt processing. When the interrupt
processing terminates, the previous processing is automatically restored from the
stack.
I
Stack operations at the start of interrupt processing
Once an interrupt is accepted, the CPU automatically saves the contents of the current
dedicated registers to the system stack in the order given below:
Accumulator (A)
Direct page register (DPR)
Additional data bank register (ADB)
Data bank register (DTB)
Program bank register (PCB)
Program counter (PC)
Processor status (PS)
Figure 6.9-1 shows the stack operations at the start of interrupt processing.
Figure 6.9-1 Stack operations at the start of interrupt processing
I
Stack operations on return from interrupt processing
When the interrupt return instruction (RETI) is executed at the termination of interrupt
processing, the PS, PC, PCB, DTB, ADB, DPR, and A values are returned from the stack in
reverse order from the order they were placed on the stack. The dedicated registers are restored
to the status they had immediately before the start of interrupt processing.
Immediately before interrupt
Address
Memory
Immediately after interrupt
Address
Memory
Byte
Byte
SP after update