beautypg.com

9 exceptions, Exceptions – FUJITSU F2MCTM-16LX User Manual

Page 98

background image

82

CHAPTER 3 INTERRUPTS

3.9

Exceptions

The F

2

MC-16LX performs exception processing when the following event occurs:

Execution of an Undefined Instruction

Exception processing is fundamentally the same as interrupt processing. When an exception is detected

between instructions, exception processing is performed separately from ordinary processing. In general,

exception processing is performed as a result of an unexpected operation. Fujitsu recommends using

exception processing for debugging or for activating emergency recovery software.

Exception Due to Execution of an Undefined Instruction

The F

2

MC-16LX handles all codes that are not defined in the instruction map as undefined instructions.

When an undefined instruction is executed, processing equivalent to the INT 10 software interrupt

instruction is performed. Specifically, the AL, AH, DPR, DTB, ADB, PCB, PC, and PS values are saved

into the system stack, and processing branches to the routine indicated by the interrupt number 10 vector. In

addition, the I flag is cleared and the S flag is set. The PC value saved in the stack is the address at which

the undefined instruction is stored. Processing can be restored by the RETI instruction, but is of no use,

however, because the same exception occurs again.