Motorola DSP56800 Manual page 396

16-bit digital signal processor
Table of Contents

Advertisement

Tcc
Operation:
If cc, then S → D
If cc, then S → D and R0 → R1
Description: Transfer data from the specified source register (S) to the specified destination accumulator (D) if the
specified condition is true. If a second source register R0 and a second destination register R1 are also
specified, transfer data from address register R0 to address register R1 if the specified condition is true.
If the specified condition is false, a NOP is executed.
Usage:
When used after the CMP instruction, the Tcc instruction can perform many useful functions such as
a "maximum value" or "minimum value" function. The desired value is stored in the destination accu-
mulator. If address register R0 is used as an address pointer into an array of data, the address of the
desired value is stored in the address register R1. The Tcc instruction may be used after any instruction
and allows efficient searching and sorting algorithms.
The term "cc" specifies the following:
CC (HS*)— carry clear (higher or same)
CS (LO*)— carry set (lower)
EQ — equal
GE — greater than or equal
GT — greater than
LE — less than or equal
LT — less than
NE — not equal
* Only available when CC bit set in the OMR
+
Note:
This instruction is considered to be a move-type instruction. Due to pipelining, if an address register
(R0 or R1 for the Tcc instruction) is changed using a move-type instruction, the new contents of the
destination address register will not be available for use during the following instruction (that is, there
is a single-instruction-cycle pipeline delay).
A-166
Transfer Conditionally
"cc" Mnemonic
denotes the logical OR operator,
denotes the logical exclusive OR operator
DSP56800 Family Manual
Assembler Syntax:
Tcc
S,D
Tcc
S,D
Condition
N ⊕ V=0
Z+(N ⊕ V)=0
Z+(N ⊕ V)=1
N ⊕ V=1
R0,R1
C=0
C=1
Z=1
Z=0
Tcc

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents