Datasheet

Instruction Set Description
www.ti.com
4.6.4.10 TSTA
* TSTA Test 20-bit destination register
TSTA Rdst
Syntax
Operation dst + 0FFFFFh + 1
dst + 0FFFFh + 1
dst + 0FFh + 1
CMPA #0,Rdst
Emulation
Description The destination register is compared with zero. The status bits are set according to the
result. The destination register is not affected.
Status Bits N: Set if destination register is negative, reset if positive
Z: Set if destination register contains zero, reset otherwise
C: Set
V: Reset
Mode Bits OSCOFF, CPUOFF, and GIE are not affected.
Example The 20-bit value in R7 is tested. If it is negative, continue at R7NEG; if it is positive but
not zero, continue at R7POS.
TSTA R7 ; Test R7
JN R7NEG ; R7 is negative
JZ R7ZERO ; R7 is zero
R7POS ...... ; R7 is positive but not zero
R7NEG ...... ; R7 is negative
R7ZERO ...... ; R7 is zero
270
CPUX SLAU144JDecember 2004Revised July 2013
Submit Documentation Feedback
Copyright © 2004–2013, Texas Instruments Incorporated