EasyManua.ls Logo

Rabbit 2000 - Page 31

Rabbit 2000
120 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Other manuals for Rabbit 2000