Illegal instruction – Zilog Z16F2810 User Manual
Page 68
System Exceptions
UM018809-0611
52
ZNEO
®
CPU Core
User Manual
For more information about the System Exception register (SYSEXCP), refer to the ZNEO
product specification that is specific to your device .
Illegal Instruction
If the Program Counter addresses any unimplemented opcode, the ZNEO CPU generates
an Illegal Instruction system exception.
FFFFH
is the default value of an unprogrammed
memory word, so the
FFFFH
opcode is defined as the Illegal Instruction Exception (ILL)
instruction.
The Break opcode (
BRK, 0000H
) operates as an ILL exception if On-Chip Debugger
(OCD) breaks are disabled. For details about the OCD, refer to the ZNEO product specifi-
cation that is specific to your device.
An illegal instruction invokes the System Exception vector at
0000_0008H
in memory.
An ILL is similar to other system exceptions except the Program Counter does not incre-
ment before it is pushed onto the stack, so the Program Counter value on the stack points
to the instruction that caused the exception.
After an illegal instruction exception occurs, the
ILL
bit in the System Exception register
in I/O memory (
SYSEXCP
) is set to 1. After the first ILL exception has executed, addi-
tional ILL exceptions will not push the Program Counter again until the
ILL
bit is cleared.
Writing 1 to the
ILL
bit clears the bit to 0. For more information, see the description of the
ILL instruction on page 106.
For more information about the System Exception register (SYSEXCP), refer to the ZNEO
product specification that is specific to your device .
An IRET instruction must not be performed to end an illegal instruction exception ser-
vice routine. As the stack contains the Program Counter value of the illegal instruction,
the IRET instruction returns the code execution to this illegal instruction.
Note:
Note:
Note:
Caution: