English
Language : 

Z8F4822AR020SG Datasheet, PDF (263/323 Pages) Zilog, Inc. – High Performance 8-Bit Microcontrollers
Z8 Encore! XP® F64xx Series
Product Specification
243
Flags Register
The Flags 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. Four of the bits (C, V, Z
and S) can be tested for use with conditional jump instructions. Two flags, H and D, can-
not be tested and are used for Binary-Coded Decimal (BCD) arithmetic.
The two remaining bits, user flags F1 and F2, are available as general-purpose status bits.
User flags are unaffected by arithmetic operations and must be set or cleared by instruc-
tions. The user flags cannot be used with conditional jumps. They are undefined at initial
power-up and are unaffected by Reset. Figure 58 displays the flags and their bit positions
in the Flags Register.
Bit
Bit
7
0
C Z S V D H F2 F1 Flags Register
User Flags
Half Carry Flag
Decimal Adjust Flag
Overflow Flag
Sign Flag
Zero Flag
Carry Flag
Note:U = Undefined.
Figure 58. Flags Register
Interrupts, the software trap (TRAP) instruction, and illegal instruction traps all 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.
PS019924-0113
PRELIMINARY
Flags Register