Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->TAS

TAS   Test and Set an Operand

ColdFire 4 Series Only


Test operand and set N and Z as appropriate.

Set high order bit (bit 7) of operand

Assembler Syntax:   TAS <ea>


Size:  Byte

The instruction tests the current value of the operand and sets the N and Z condition bits appropriately.  It also sets the high-order bit of the operand. The operand uses a read-modify-write memory cycle that completes the operation without interruption. This instruction supports use of a flag or semaphore to coordinate several processors.



Condition Codes:

N    Set if most significant bit of operand was set
Z    Set if result was zero, else cleared
V    Always cleared
C    Always cleared
X    Not affected

    
Allowable Addressing Modes
    
#<data>,(An)
#<data>,(An)+
#<data>,-(An)
#<data>,(d16,An)
#<data>,(d8,An,Xn)
#<data>,(xxx).W
#<data>,(xxx).L