![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_168.png)
144
CHAPTER 6 INTERRUPTS
MB90560 series
6.5
Software Interrupts
When the software interrupt instruction (INT instruction) is executed, the software
interrupt function transfers control from the program being executed by the CPU to the
user-defined interrupt processing program. Hardware interrupts are disabled during
execution of a software interrupt.
I
Software interrupt activation
G
Software interrupt activation
The INT instruction is used to activate a software interrupt. There is no interrupt request flag or
enable flag for software interrupt requests. When the INT instruction is executed, an interrupt
request is always generated.
G
Hardware interrupt suppression
Since the INT instruction does not have interrupt levels, the interrupt level mask register (ILM) is
not updated. During the execution of the INT instruction, the I flag of the condition code register
(CCR) is set to “0”, and hardware interrupts are masked.
To enable hardware interrupts during software interrupt processing, set the I flag to “1” in the
software interrupt processing routine.
G
Software interrupt operation
When the CPU fetches the INT instruction, the software interrupt processing microcode is
activated. This microcode saves the internal CPU registers on the system stack, masks
hardware interrupts (CCR: I = 0), and branches to the corresponding interrupt vector.
<Reference>
See Section 6.2, "Interrupt Causes and Interrupt Vectors," in Chapter 6 for more information
about the allocation of interrupt numbers and interrupt vectors.
I
Returning from a software interrupt
In the interrupt processing program, when the interrupt return instruction (RETI instruction) is
executed, the 12-byte data saved into the system stack is restored to the dedicated registers
and the processing that was being executed before branching for the interrupt is resumed.