Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->TST

TST    Test an Operand


Test operand and set N and Z as appropriate.

    
Assembler Syntax:TST <ea>
TST.sz <ea>
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
     
Dn
An
(An)
(An)+
-(An)
(d16,An)
(d8,An,Xn)
(xxx).W
(xxx).L
(d16,PC)
(d8,PC,Xn)