EasyManua.ls Logo

ZiLOG Z8 - Condition Codes for Jumps

ZiLOG Z8
220 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Z8 Microcontrollers
ZiLOG Instruction Set
UM001601-0803 12-5
12.3 CONDITION CODES
The C, Z, S, and V Flags control the operation of the ‘Condition-
al’ Jump instructions. Sixteen frequently useful functions of the
flag settings are encoded in a 4-bit field called the condition code
(cc), which forms bits 4-7 of the conditional instructions.
Condition codes and flag settings are summarized in Tables 12-
9, 12-10, and 12-11. Notation for the flags and how they are af
-
fected are as follows:
Table 12-9. Z8 Flag Definitions
Flag Description
C Carry Flag
Z Zero Flag
S Sign Flag
V Overflow Flag
D Decimal Adjust Flag
H Half Carry Flag
Table 12-10. Flag Settings Definitions
Symbol Definition
0 Cleared to 0
1 Set to 1
* Set or cleared according to operation
Unaffected
X Undefined
Table 12-11. Condition Codes
Binary HEX Mnemonic Definition Flag Settings
0000 0 F Always False
1000 8 (blank) Always True
0111 7 C Carry C = 1
1111 F NC No Carry C = 0
0110 6 Z Zero Z = 1
1110 E NZ Non-Zero Z = 0
1101 D PL Plus S = 0
0101 5 Ml Minus S = 1
0100 4 OV Overflow V = 1
1100 C NOV No Overflow V = 0
0110 6 EQ Equal Z = 1
1110 E NE Not Equal Z = 0
1001 9 GE Greater Than or Equal (S XOR V) = 0
0001 1 LT Less Than (S XOR V) = 1
1010 A GT Greater Than (Z OR (S XOR V)) = 0
0010 2 LE Less Than or Equal (Z OR (S XOR V)) = 1
1111 F UGE Unsigned Greater Than or Equal C = 0
0111 7 ULT Unsigned Less Than C = 1
1011 B UGT Unsigned Greater Than (C = 0 AND Z = 0) = 1
0011 3 ULE Unsigned Less Than or Equal (C OR Z) = 1

Table of Contents

Other manuals for ZiLOG Z8

Related product manuals