Trap Instruction; Table 4.4 Status Of Ccr And Exr After Trap Instruction Exception Handling - Renesas H8S/2368 Series Hardware Manual

16-bit single-chip microcomputer
Table of Contents

Advertisement

4.6

Trap Instruction

Trap instruction exception handling starts when a TRAPA instruction is executed. Trap instruction
exception handling can be executed at all times in the program execution state.
The trap instruction exception handling is as follows:
1. The values in the program counter (PC), condition code register (CCR), and extended register
(EXR) are saved in the stack.
2. The interrupt mask bit is updated and the T bit is cleared to 0.
3. A vector address corresponding to the interrupt source is generated, the start address is loaded
from the vector table to the PC, and program execution starts from that address.
The TRAPA instruction fetches a start address from a vector table entry corresponding to a vector
number from 0 to 3, as specified in the instruction code.
Table 4.4 shows the status of CCR and EXR after execution of trap instruction exception handling.
Table 4.4
Status of CCR and EXR after Trap Instruction Exception Handling
Interrupt Control Mode
0
2
Legend:
1:
Set to 1
0:
Cleared to 0
—: Retains value prior to execution.
CCR
I
UI
1
1
EXR
I2 to I0
T
0
Rev. 2.00, 05/03, page 75 of 820

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s seriesH8s/2300 series

Table of Contents