EasyManuals Logo

Texas Instruments TMS320C28x User Manual

Texas Instruments TMS320C28x
695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #312 background imageLoading...
Page #312 background image
MINL ACC,loc32
6-155
MINL ACC,loc32 Find the 32-bit Minimum
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
MINL ACC,loc32
0101 0110 0101 0000
0000 0000 LLLL LLLL
1 Y N+1
Operands ACC Accumulator register
loc32 Addressing mode (see Chapter 5)
Description Compare the content of the ACC register with the location pointed to by the
“loc32” addressing mode and load the ACC register with the larger of these
two values:
if(ACC <= [loc32]), ACC = unchanged;
if(ACC > [loc32]), ACC = [loc32];
Flags and
Modes
Z If ACC is equal to the contents of the addressed location (ACC = [loc32]), set
Z; otherwise clear Z.
N If ACC is less then the contents of the addressed location, (ACC < [loc32]),
set N; otherwise clear N. The MINL instruction assumes infinite precision
when it determines the sign of the result. For example, consider the
subtraction 0x8000 0000 0x0000 0001. If the precision were limited to 32
bits, the result would cause an overflow to the positive number 0x7FFF FFFF
and N would be cleared. However, because the MINL instruction assumes
infinite precision, it would set N to indicate that 0x8000 0000 0x0000 0001
actually results in a negative number.
C If (ACC [loc32]) generates a borrow, clear the C bit; otherwise set C.
V If ACC is less then the contents of the addressed location (ACC < [loc32]),
set V. This instruction cannot clear the V flag.
Repeat This instruction is repeatable. If the operation follows a RPT instruction, then
the MINL instruction will be executed N+1 times. The state of the Z, N, and C
flags will reflect the final result. The V flag will be set if an intermediate
overflow occurs.
Example
; Saturate VarA as follows:
; if(VarA > MaxPos) VarA = MaxPos
; if(VarA < MaxNeg) VarA = MaxNeg
MOVL ACC,@VarA ; ACC = VarA
MINL ACC,@MaxPos ; if(ACC > MaxPos) ACC = MaxPos
MAXL ACC,@MaxNeg ; if(ACC < MaxNeg) ACC = MaxNeg
MOVL @VarA,ACC ; Store result into VarA

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320C28x and is the answer not in the manual?

Texas Instruments TMS320C28x Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320C28x
CategoryProcessor
LanguageEnglish

Related product manuals