Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->CMPI

CMPI    Compare Immediate

Compatibility: 68000, 68010, 68020, CPU32 families

Destination - Immediate Data


Assembler Syntax:    CMPI #<data>,<ea>


<ea> - data alterable

Size:    Byte, Word or Long

Subtracts the immediate data from the destination operand and sets the condition codes according to the result; the destination location is not changed.  The size of the immediate data matches the operation size.


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 cleared
X    Not affected

    
Allowable Addressing Modes
    
CMPI#(data),Dn
CMPI#(data),(An)
CMPI#(data),(An)+
CMPI#(data),-(An)
CMPI#(data),(d16,An)
CMPI#(data),(d8,An,Xn)
CMPI#(data),(bd,An,Xn) 2
CMPI#(data),([bd,An,Xn],od) 1
CMPI#(data),([bd,An],Xn,od) 1
CMPI#(data),(xxx).W
CMPI#(data),(xxx).L
CMPI#(data),(d16,PC)
CMPI#(data),(d8,PC,Xn)
CMPI#(data),(bd,PC,Xn) 2
CMPI#(data),([bd,PC,Xn],od) 1
CMPI#(data),([bd,PC],Xn,od) 1
1   68020 only
2   68020 and CPU32 only