Exception Processing Interrupt By Executing Undefined Instruction - Fujitsu F2MC-16LX Hardware Manual

Mb90470 series 16-bit microcontroller
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

3.8
Exception Processing Interrupt by Executing Undefined
Instruction
2
The F
MC-16LX performs exception processing by executing an undefined instruction.
Exception processing is basically the same with an interrupt (i.e., interrupts normal
processing and starts exception processing if exceptional event generation is
detected when processing moves to the next instruction). Generally, exception
processing is generated when an unexpected operation is done. Therefore, use of
exception processing is recommended only for debugging or if recovery software has
been started for emergency use.
I Exception processing interrupt by executing undefined instruction
❍ Exception processing operation
2
The F
MC-16LX treats all codes not defined on an instruction map as an undefined instruction.
If undefined instructions are executed, the same processing as that for a software interrupt
instruction such as "INT #10" is performed.
processing before branching to the interrupt routine.
Stores the A, DPR, ADB, DTB, PCB, PC, PS registers in the system stack.
Clears the I-flag of the condition code register (CCR) to "0", masking the hardware interrupt.
Sets the S-flag of the condition code register (CCR) to "1", enabling operation of the system
stack.
A program counter (PC) value stored in the stack represents an address where an undefined
instruction is stored. An instruction code of two bytes or more is the address where a code
identified as "undefined" is stored. In the exception processing routine, if the type of exception
factor must be identified, use this PC value.
❍ Return from exception processing
During a return from exception processing with the RETI instruction, another exception
processing starts since PC points to an undefined instruction. Take appropriate action, such as
a software reset.
CHAPTER 3 INTERRUPT
Exception processing performs the following
93

Advertisement

Table of Contents
loading

Table of Contents