S3F84B8_UM_REV 1.00
6 INSTRUCTION SET
6-11
6.2.3 CONDITION CODES
The opcode of a conditional jump always contains a 4-bit field called the condition code (cc). This code specifies
the conditions under which the jump is executed. For example, a conditional jump with the condition code for
“equal” after a compare operation only jumps if the two operands are equal.
lists the condition codes. The carry (C), zero (Z), sign (S), and overflow (V) flags control the operation of
conditional jump instructions.
Table 6-6 Condition Codes
Binary
Mnemonic
Description
Flags Set
0000 F
Always
false
–
1000 T
Always
true
–
C
Carry
C = 1
NC
No carry
C = 0
Z
Zero
Z = 1
NZ
Not zero
Z = 0
1101
PL
Plus
S = 0
0101
MI
Minus
S = 1
0100
OV
Overflow
V = 1
1100
NOV
No overflow
V = 0
EQ
Equal
Z = 1
NE
Not equal
Z = 0
1001
GE
Greater than or equal
(S XOR V) = 0
0001
LT
Less than
(S XOR V) = 1
1010
GT
Greater than
(Z OR (S XOR V)) = 0
0010
LE
Less than or equal
(Z OR (S XOR V)) = 1
UGE
Unsigned greater than or equal
C = 0
ULT
Unsigned less than
C = 1
1011
UGT
Unsigned greater than
(C = 0 AND Z = 0) = 1
0011
ULE
Unsigned less than or equal
(C OR Z) = 1
NOTE:
1. It indicates the condition codes related to two different mnemonics that test the same flag. For example, Z and EQ are
both true if zero flag (Z) is set, but after an ADD instruction, Z may be used; however, after a CP instruction, EQ may be
used.
2. For operations involving unsigned numbers, special condition codes like UGE, ULT, UGT, and ULE must be used.