Samsung S3P80C5 User Manual page 121

8-bit cmos microcontrollers
Table of Contents

Advertisement

INSTRUCTION SET
CONDITION CODES
The opcode of a conditional jump always contains a 4-bit field called the condition code (cc). This specifies under
which conditions it is to execute the jump. For example, a conditional jump with the condition code for "equal"
after a compare operation only jumps if the two operands are equal. Condition codes are listed in Table 6-6.
The carry (C), zero (Z), sign (S), and overflow (V) flags are used to control the operation of 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
NOTES:
1.
It indicates condition codes that are related to two different mnemonics but which test the same flag. For
example, Z and EQ are both true if the zero flag (Z) is set, but after an ADD instruction, Z would probably be used;
after a CP instruction, however, EQ would probably be used.
2.
For operations involving unsigned numbers, the special condition codes UGE, ULT, UGT, and ULE must be used.
6-12
Table 6-6. Condition Codes
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
Description
S3P80C5/C80C5/C80C8
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

Advertisement

Table of Contents
loading

This manual is also suitable for:

S3c80c5S3c80c8

Table of Contents