beautypg.com

System exceptions – Zilog Z16F2810 User Manual

Page 65

background image

UM018809-0611

System Exceptions

ZNEO

®

CPU Core

User Manual

49

System Exceptions

System exceptions are similar to Vectored Interrupts; however, exceptions are generated
by the CPU and cannot be masked or disabled. There are five ZNEO CPU events that gen-
erate system exceptions; each is listed below and described in this chapter.

Program Counter Overflow

Stack Overflow

Divide-by-Zero

Divide Overflow

Illegal Instruction

It is possible for individual ZNEO CPU products to generate system exceptions in addition
to those listed above.

To determine if your device generates other system exceptions, refer to the ZNEO product
specification that is specific to your device .

Following a system exception, the Flags and Program Counter are pushed on the stack.
The Program Counter value that is pushed onto the stack points to the next instruction (not
the instruction that generated the system exception).

The system exception vector is stored in a reserved memory quad at

0000_0008H

in the

nonvolatile memory space. The vector is a 32-bit pointer (service routine address) stored
in the 4-byte quad. When an exception occurs, the vector replaces the value in the Program
Counter (PC). Program execution continues with the instruction pointed to by the new PC
value.

Symbolic Operation of System Exception

A symbolic operation of system exceptions is exemplified below.

SP

SP – 1

(SP)

Flags

SP

SP – 5

(SP)

PC

PC

Vector

Note:

This manual is related to the following products: