Stack Operations For Interrupt Processing - Fujitsu MB90460 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 7 INTERRUPT
7.8

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.
■ 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 7.8-1 shows the stack operations at the start of interrupt processing.
Figure 7.8-1 Stack Operations at the Start of Interrupt Processing
Immediately before interrupt
■ 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.
150
Immediately after interrupt
Memory
Address
Byte
Memory
Address
before update
SP after update
Byte

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents