EasyManua.ls Logo

Rabbit 2000 - Page 39

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...
Instruction Reference Manual 35
Description
Compares the data in A with an 8-bit constant n. This compare is accomplished by subtracting n from A. The
result is:
A<n:S=1,C=1,Z=0, L/V=V
A=n:S=0,C=0,Z=1, L/V=V
A>n:S=0,C=0,Z=0, L/V=V
“V” indicates that the overflow flag is set on an arithmetic overflow result. That is, the overflow flag is sig-
nalled 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 over-
flow flag will be set.
This operation does not affect the data in A.
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

Other manuals for Rabbit 2000