Toshiba TC9349AFG Manual page 52

Cmos digital integrated circuit silicon monolithic
Table of Contents

Advertisement

3. Return Processing from the Interrupt Processing Routine
The only RNI instruction is used to return the operational state to the processing being carried out before reception of
the interrupt from the interrupt routine.
Execution of the RNI instruction causes the following processing to be carried out automatically in sequence.
1)
Interrupt of the priority below the returning interrupt factor is permitted.
2)
The contents of the interrupt stack register specified by the interrupt stack pointer are returned to the G-register,
data selection, carry flag, and data register; and the contents of the address stack register data specified by the
address stack pointer are returned to the program counter.
3)
The contents of the address stack pointer (ASP) and the interrupt stack pointer (ISP) are adjusted by +1.
The RNI instruction for the above-mentioned processing is processed in one instruction cycle.
Note: Always execute the return from interrupt using the RNI instruction.
4. Interrupt Processing Routine
If interrupt has been permitted, the CPU accepts the interrupt request regardless of the program executed at that time
when the interrupt request is issued. To return to the original program on execution of interrupt processing, therefore, it is
necessary to restore the original operational state, as if interrupt processing had not occurred. For this reason, it is necessary
to perform shunting and return operations within the interrupt processing routine, at least for those register and data
memories that can be operated within the interrupt processing routine.
(1)
Evacuation processing
When the CPU accepts the interrupt, it automatically evacuates the content of G-register, data selection, carry flag
and data register to the interrupt stack register. The contents of the area of the data memory and the general register
used by the interrupt processing routine are evacuated as necessary by the program before use
(2)
Return processing
The contents of the G-register, data selection, carry flag, and data register return automatically when the RNI
instruction is executed. Therefore the return processing works in the opposite way to that of the evacuation
processing previously mentioned.
5. Multiplex Interrupt
Multiplex interrupt is a method of processing other interrupts during interrupt processing.
As shown in the figure, the separate interrupt factors C and D are processed during the interrupt processing of interrupt
factors A and B. The depth of interrupt at this time is called the interrupt level.
Main
routine
MAIN
Interrupt
Interrupt
level 1
level 2
B
D
A
B
C
Example of multiplex interrupt
52
TC9349AFG
Interrupt
Interrupt
level 3
level 4
C
D
2006-02-24

Advertisement

Table of Contents
loading

Table of Contents