Cp Xh,I; Compare Immediate Data I With Xh; Cp Xl,I; Compare Immediate Data I With Xl - Epson 6200A Core Cpu Manual

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

Advertisement

3 INSTRUCTION SET

CP XH,i

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

CP XL,i

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

Compare immediate data i with XH

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

Compare immediate data i with XL

CP XL,i
XL - i
to i
3
0
1 0 1 0 0 1 0 1 i
MSB
IV
7
C –
Set if XL < i
to i
; otherwise, reset.
3
0
Z –
Set if XL = i
to i
; otherwise, reset.
3
0
D –
Not affected
I –
Not affected
Compares immediate data i to XL by subtracting i from the contents of XL. XL
remains unchanged.
1. When Z = 0 and C = 0 then i < XL
2. When Z = 1 and C = 0 then i = XL
3. When Z = 0 and C = 1 then i > XL
CP XL,7
XL register
1001
C flag
0
Z flag
0
i
i
i
A40H to A4FH
3
2
1
0
LSB
CP XH,4
0100
0100
0
0
i
i
i
A50H to A5FH
3
2
1
0
LSB
CP XL,9
1001
1001
0
0
EPSON
CP XH,9
0100
0
1
1
0
CP XL,0AH
1001
0
1
1
0
S1C6200/6200A CORE CPU MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c6200S1c6200a

Table of Contents