Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->TST

TST    Test an Operand

Compatibility: 68000, 68010, 68020 and CPU32 families.


Test operand and set N and Z as appropriate.


Assembler Syntax:    TST <ea>


<ea> - data alterable

Size:  Byte, Word, Long

Compares the operand with zero and sets the condition codes according to the results of the test.


Condition Codes:

N    Set if result negative, else cleared
Z    Set if result zero, else cleared
V    Always cleared
C    Always cleared
X    Not affected

    
Allowable Addressing Modes
    
<ea>,DnDn,<ea>
    
TSTDn
TSTAn
TST(An)
TST(An)+
TST-(An)
TST(d16,An)
TST(d8,An,Xn)
TST(bd,An,Xn) 2
TST([bd,An,Xn],od) 1
TST([bd,An],Xn,od) 1
TST(xxx).W
TST(xxx).L
TST(d16,PC)
TST(d8,PC,Xn)
TST(bd,PC,Xn) 2
TST([bd,PC,Xn],od) 1
TST([bd,PC],Xn,od) 1
1   68020 only
2   68020 and CPU32 only