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 #472 background imageLoading...
Page #472 background image
SAT64 ACC:P
6-315
Example
; Add 64-bit VarA, VarB and VarC, sat and store result in VarD:
ZAP OVC ; Clear overflow counter
MOVL P,@VarA+0 ; Load P with low 32-bits of VarA
ADDUL P,@VarB+0 ; Add to P unsigned low 32-bits of VarB
ADDUL P,@VarC+0 ; Add to P unsigned low 32-bits of VarC
MOVU @AL,OVC ; Store overlow (repeated carry) in the ACC
; and then add higher portion of the 64 bit
; variables
MOVB AH,#0 ; Store overlow (repeated carry) in the ACC
; and then add higher portion of the 64 bit
; variables
ZAP OVC ; Clear overflow counter
ADDL ACC,@VarA+2 ; Add to ACC with carry high 32-bits of VarA
ADDL ACC,@VarB+2 ; Add to ACC with carry high 32-bits of VarB
ADDL ACC,@VarC+2 ; Add to ACC with carry high 32-bits of VarC
SAT64 ACC:P ; Saturate ACC:P based on OVC value
MOVL @VarD+0,P ; Store low 32-bit result into VarD
MOVL @VarD+2,ACC ; Store high 32-bit result into VarD

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