7480 Group and 7481 Group User's Manual
1-49
HARDWARE
1.11 Interrupts
1.11.4 Interrupt Sequence
Interrupt sequence is described below.
Generation of Interrupt Requests
When an interrupt request other than the BRK instruction interrupt is generated, the interrupt request bit
of the corresponding interrupt request register is set to ‘1’. At this time, the interrupt request is accepted
when both the following conditions are satisfied:
The interrupt enable bit of the corresponding interrupt control register is ‘1’.
The interrupt disable flag of the processor status register is ‘0’.
When the BRK instruction interrupt request is generated, the break flag of the processor status register
is set to ‘1’, causing the interrupt request to be accepted unconditionally.
For interrupt sources, refer to Section 1.11.3 Interrupt Sources. Also for interrupt control, refer to
Section 1.11.5 Interrupt Control.
Acceptance of Interrupt Request
When an interrupt request is accepted, the following operations are performed:
[1] Upon the completion of the instruction being executed, the processing is temporarily suspended.
[2] The contents of the program counter and the processor status register are pushed onto the stack in
the following order:
High-order 8 bits of the program counter
Low-order 8 bits of the program counter
Processor status register
[3] The jump address (the start address of an interrupt service routine) stored in the vector address of
the accepted interrupt is set in the program counter, and the interrupt service routine is executed. At
this time, the interrupt disable flag is set to ‘1’, and multiple interrupts are disabled. Also, the corresponding
interrupt request bit is cleared to ‘0’ for any interrupt other than the BRK instruction interrupt.
[4] When the RTI instruction, which is, the last instruction of the interrupt service routine, is executed, the
contents of the program counter and the processor status register pushed onto the stack are pulled
to the corresponding register in the following order:
Processor status register
Low-order 8 bits of program counter
High-order 8 bits of program counter
[5] The program temporarily suspended by the acceptance of the interrupt request is resumed at the
address indicated by the program counter.
Note: When the BRK instruction is executed, 2 is added to the contents of program counter, and then
the contents of the program counter are pushed onto the stack. As a result, upon return from the
BRK instruction interrupt service routine, the one byte subsequent to the BRK instruction is not
executed. Therefore, at programming, it is necessary to insert the NOP instruction immediately
after the BRK instruction.