XA User Guide 6-80 4/17/98
CMP Integer Compare
Syntax: CMP dest, src
Operation: dest - src
Description: The byte or word specified by the source operand is compared to the specified
destination operand by performing a twos complement binary subtraction of src from dest. The
flags are set according to the rules of subtraction. The source and destination data are not affected
by the operation.
Size: byte-byte, word-word
Flags Updated: C, AC, V, N, Z
CMP Rd, Rs
Operation: (Rd) - (Rs)
Bytes: 2
Clocks: 3
Encoding:
CMP Rd, [Rs]
Operation: (Rd) - ((WS:Rs))
Bytes: 2
Clocks: 4
Encoding:
0 1 0 0 SZ 0 0 1 d d d d s s s s
0 1 0 0 SZ 0 1 0 d d d d 0 s s s