Condition Codes - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00

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
Table 6-6
conditional jump instructions.
Binary
0000
1000
(NOTE)
0111
(NOTE)
1111
(NOTE)
0110
(NOTE)
1110
1101
0101
0100
1100
(NOTE)
0110
(NOTE)
1110
1001
0001
1010
0010
(NOTE)
1111
(NOTE)
0111
1011
0011
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.
Table 6-6
Mnemonic
F
Always false
T
Always true
C
Carry
NC
No carry
Z
Zero
NZ
Not zero
PL
Plus
MI
Minus
OV
Overflow
NOV
No overflow
EQ
Equal
NE
Not equal
GE
Greater than or equal
LT
Less than
GT
Greater than
LE
Less than or equal
UGE
Unsigned greater than or equal
ULT
Unsigned less than
UGT
Unsigned greater than
ULE
Unsigned less than or equal
Condition Codes
Description
6-11
6 INSTRUCTION SET
Flags Set
C = 1
C = 0
Z = 1
Z = 0
S = 0
S = 1
V = 1
V = 0
Z = 1
Z = 0
(S XOR V) = 0
(S XOR V) = 1
(Z OR (S XOR V)) = 0
(Z OR (S XOR V)) = 1
C = 0
C = 1
(C = 0 AND Z = 0) = 1
(C OR Z) = 1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents