
Instruction Reference Manual
27
Description
Compares the data in the Accumulator with an 8-bit constant n. This compare is accomplished by subtracting
n from the Accumulator. If the value of the data in the Accumulator is less than the value of n, then the Sign
Flag and the Carry Flag are set. If they are equal, the Zero Flag is set. If n is greater than the data in the Accu-
mulator, then the Sign, Carry, and Zero Flags are reset. This operation does not affect the data in the Accumu-
lator.
Description
Compares the data in Accumulator with the data in register r (any of the registers A, B, C, D, E, H, or L). This
compare is accomplished by subtracting the appropriate data (r) from the Accumulator. If the value of the
data in the Accumulator is less than the value of the data compared, then the Sign Flag and the Carry Flag are
set. If they are equal, the Zero Flag is set. If the data is greater than the data in the Accumulator, then the Sign,
Carry, and Zero Flags are reset. This operation does not affect the data in the Accumulator
CP n
Opcode
Instruction
Clocks
Operation
FE n
CP n
4 (2,2)
A - n
Flags
ALTD
I/O
S
Z
L/V
C
F
R
SP
S
D
•
•
V
•
•
CP r
Opcode
Instruction
Clocks
Operation
——
BF
B8
B9
BA
BB
BC
BD
CP r
CP A
CP B
CP C
CP D
CP E
CP H
CP L
2
2
2
2
2
2
2
2
A - r
A - A
A - B
A - C
A - D
A - E
A - H
A - L
Flags
ALTD
I/O
S
Z
L/V
C
F
R
SP
S
D
•
•
V
•
•
Содержание 2000
Страница 2: ...ii Rabbit 2000 3000 Microprocessor...
Страница 4: ...iv Rabbit 2000 Microprocessor...
Страница 16: ...12 Rabbit 2000 3000 Microprocessor...
Страница 112: ...108 Rabbit 2000 3000 Microprocessor...
Страница 120: ...ii Rabbit 2000 3000 Microprocessor...