
127
6.4 Hardware Interrupts
6.4
Hardware Interrupts
A hardware interrupt operates as follows: an interrupt request that is output by a
peripheral function (resource) temporarily interrupts a program being executed by the
CPU and transfers control to a user-defined interrupt processing program. The
extended intelligent I/O service (EI2OS) is also handled as a hardware interrupt.
s Hardware Interrupts
r Hardware interrupt function
The hardware interrupt function determines whether an interrupt can be accepted. To do so, it
compares the interrupt level of an interrupt request that is output by a peripheral function
(resource) with the interrupt level mask register (PS: ILM) while referring to the contents of the I
flag (PS: I).
If a hardware interrupt is accepted, the contents of the direct page register (DPR), accumulator
(A), program counter (PC), processor status register (PS), and bank registers (ADB, DTB, and
PCB) are saved to the system stack. An interrupt level stored in the ICR register is then stored
in the interrupt level mask register (ILM). Finally, the processing branches to the interrupt vector
and the interrupt processing program is executed.
r Multiple interrupts
A hardware interrupt can be activated while the interrupt processing program is being executed.
r Extended intelligent I/O service (EI2OS)
EI2OS is a data transfer function between memory and I/O registers. When the transfer of data
to the extended intelligent I/O service descriptor is completed, a hardware interrupt is activated.
EI2OS cannot be activated in duplicate. While EI2OS is being processed, no interrupt request
or EI2OS request is accepted. When the processing of EI2OS is completed, interrupt request or
EI2OS request is accepted.
r External interrupt
An external interrupt is accepted as a hardware interrupt if a circuit that can output an interrupt
request from an external terminal (DTP/external interrupt circuit) detects an interrupt request.
r Interrupt vector
Interrupt vector tables referenced during interrupt processing are allocated to memory at
FFFC00H to FFFFFFH.
See Section
6.2 "Interrupt causes and Interrupt Vectors", for more information about the
allocation of interrupt numbers and interrupt vectors.