Cp Yh,I; Compare Immediate Data I With Yh; Cp Yl,I; Compare Immediate Data I With Yl - Epson 6200A Core Cpu Manual

Core cpu cmos 4-bit single chip microcomputer
Table of Contents

Advertisement

CP YH,i

Source Format:
Source Format:
Operation:
Operation:
OP-Code:
OP-Code:
Type:
Type:
Clock Cycles:
Clock Cycles:
Flag:
Flag:
Description:
Description:
Example:
Example:

CP YL,i

Source Format:
Source Format:
Operation:
Operation:
OP-Code:
OP-Code:
Type:
Type:
Clock Cycles:
Clock Cycles:
Flag:
Flag:
Description:
Description:
Example:
Example:
S1C6200/6200A CORE CPU MANUAL

Compare immediate data i with YH

CP YH,i
YH - i
to i
3
0
1 0 1 0 0 1 1 0 i
MSB
IV
7
C –
Set if YH < i
to i
; otherwise, reset.
3
0
Z –
Set if YH = i
to i
; otherwise, reset.
3
0
D –
Not affected
I –
Not affected
Compares immediate data i to YH by subtracting i from the contents of YH. YH
remains unchanged.
1. When Z = 0 and C = 0 then i < YH
2. When Z = 1 and C = 0 then i = YH
3. When Z = 0 and C = 1 then i > YH
CP YH,0AH
YH register
1010
C flag
1
Z flag
0

Compare immediate data i with YL

CP YL,i
YL - i
to i
3
0
1 0 1 0 0 1 1 1 i
MSB
IV
7
C –
Set if YL < i
to i
; otherwise, reset.
3
0
Z –
Set if YL = i
to i
; otherwise, reset.
3
0
D –
Not affected
I –
Not affected
Compares immediate data i to YL by subtracting i from the contents of YL. YL
remains unchanged.
1. When Z = 0 and C = 0 then i < YL
2. When Z = 1 and C = 0 then i = YL
3. When Z = 0 and C = 1 then i > YL
CP YL,5
YL register
0100
C flag
0
Z flag
1
i
i
i
A60H to A6FH
3
2
1
0
LSB
CP YH,3
1010
1010
0
1
i
i
i
A70H to A7FH
3
2
1
0
LSB
CP YL,1
0100
0100
1
0
EPSON
3 INSTRUCTION SET
CP YH,0FH
1010
0
1
0
0
CP YL,4
0100
0
0
0
1
37

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c6200S1c6200a

Table of Contents