EasyManua.ls Logo

Rabbit 2000 - Page 40

Rabbit 2000
174 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...
36 Rabbit 2000/3000 Microprocessor
Description
Compares the data in A 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 data in register r from A. The result is:
A<x:S=1,C=1,Z=0, L/V=V
A=x:S=0,C=0,Z=1, L/V=V
A>x:S=0,C=0,Z=0, L/V=V
Where“x”isthedatainregisterr and “V” indicates that the overflow flag is set on an arithmetic overflow
result. That is, the overflow flag is signalled when the operands have different signs and the sign of the result
is different from the argument you are subtracting from (A in this case). For example if A contains 0x80 and
you're comparing it to 0x01 the overflow flag will be set.
This operation does not affect the data in A.
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