cp

Operands

cp r | cp r,r' | cp (rr) | cp r,(rr) | cp (ii+dd) | cp r,(ii+dd) | cp nn | cp r,nn

Subtracts B from A and affects flags according to the result. A is not modified.

Loading...

Variants

Every form of cp the assembler accepts. The cycles column counts clock cycles, written as taken/not taken for the conditional forms.

InstructionDescriptionFlagsBytesCycles
cp b

Subtracts B from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS14
cp c

Subtracts C from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS14
cp d

Subtracts D from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS14
cp e

Subtracts E from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS14
cp h

Subtracts H from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS14
cp l

Subtracts L from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS14
cp (hl)

Subtracts (HL) from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS17
cp a

Subtracts A from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS14
cp ixh undocumented

Subtracts IXH from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS28
cp ixl undocumented

Subtracts IXL from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS28
cp (ix+dd)

Subtracts the value pointed to by IX plus dd from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS319
cp iyh undocumented

Subtracts IYH from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS28
cp iyl undocumented

Subtracts IYL from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS28
cp (iy+dd)

Subtracts the value pointed to by IY plus dd from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS319
cp nn

Subtracts nn from A and affects flags according to the result. A is not modified.

CN=1P/V=VHZS27