Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->CMP

CMP    Compare

Destination - Source

    
Assembler Syntax:CMP.L <ea>,Dn
CMP <ea>,Dn (V4 and above)
CMP.sz <ea>,Dn (V4 and above)
Size:    Long plus for ColdFire 4 Series Byte and Word

Subtracts the source operand from the destination data register and sets the condition codes according  to the result; the data register is not changed.


Condition Codes:

N    Set if result negative, else cleared
Z    Set if result zero, else cleared
V    Set if overflow, else cleared
C    Set if borrow, else clear
X    Not affected

    
Allowable Addressing Modes
    
Dn,Dn
An,Dn  not byte
(An),Dn
(An)+,Dn
-(An),Dn
(d16,An),Dn
(d8,An,Xn),Dn
(xxx).W,Dn
(xxx).L,Dn
#(data),Dn
(d16,PC),Dn
(d8,PC,Xn),Dn