Exception Handling By Illegal Instruction - Renesas H8S/2100 Series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for H8S/2100 Series:
Table of Contents

Advertisement

Section 4 Exception Handling
4.6

Exception Handling by Illegal Instruction

The exception handling by the illegal instruction starts when an undefined code is executed. The
exception handling by the illegal instruction is always executable in the program execution state.
The exception handling operates as follows:
1. The contents of the PC and CCR are saved in the stack.
2. The interrupt mask bit is updated.
3. An exception handling vector table address corresponding to the occurred exception is
generated, the start address of the exception service routine is loaded from the vector table to
the PC, and program execution starts from that address.
Table 4.5 shows the state of CCR after execution of illegal instruction exception handling.
Table 4.5
Status of CCR after Illegal Instruction Exception Handling
Interrupt Control Mode
0
1
Illegal instruction code is not detected for fields that do not affect the definition of the instruction,
such as an effective address extension (EA) and register fields. In addition, the instruction code of
instructions consisting of multiple words are detected individually and are not detected as
combinations of instruction codes.
Do not execute instruction codes that are not defined. The contents of general registers are not
guaranteed after the execution of an undefined instruction code or exception handling by the
illegal instruction. The value of the stack pointer at the time of exception handling by the illegal
instruction and the saved contents of the PC are also not guaranteed.
Rev. 1.00 Apr. 28, 2008 Page 82 of 994
REJ09B0452-0100
I
Set to 1
Set to 1
CCR
UI
Retains the previous value
Set to 1

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2117r seriesR4f2117r

Table of Contents