beautypg.com

Program counter overflow register, Stack pointer overflow, Flags register (flags) – Zilog Z16F2810 User Manual

Page 25: Figure 2, Flags register

background image

UM018809-0611

Architectural Overview

ZNEO

®

CPU Core

User Manual

9

Program Counter Overflow Register

The Program Counter Overflow Register (PCOV) implements program counter overflow
protection. For more details, see the

Program Counter Overflow

section on page 50.

Stack Pointer Overflow

The Stack Pointer Overflow Register (SPOV) is used to provide stack pointer overflow
protection. For more details, see the

Stack Overflow

section on page 50. CALL, ILL,

IRET, POP, PUSH, RET and TRAP instructions, system interrupts and exceptions use the
ALU Register. R15 is used as the Stack Pointer.

Flags Register (FLAGS)

This byte register contains the status information regarding the most recent arithmetic,
logical, bit manipulation or rotate and shift operation. The Flags Register contains six bits
of status information that are set or cleared by CPU operations. Five of the bits (C, Z, S, V
and B) can be tested with conditional jump instructions. The

IRQE

bit is the Master Inter-

rupt Enable flag, and the CIRQE bit is the Chained Interrupt Enable flag. Figure 2 displays
the flags and their bit positions in the Flags Register.

Interrupts, System Exceptions, and the software Trap (TRAP) instruction write the value
of the Flags Register to the stack. Executing an Interrupt Return (IRET) instruction
restores the value saved on the stack into the Flags Register.

Figure 2. Flags Register

C

Z

S

V

B

F1

CIRQE

IRQE

Flags Register

Bit

0

Bit

7

Master Interrupt Enable

Chained Interrupt Enable

User Flag 1

Blank Flag

Overflow Flag

Sign Flag

Zero Flag

Carry Flag

This manual is related to the following products: