Texas Instruments TMS320C28x Reference Manual page 551

Dsp cpu and instruction set
Table of Contents

Advertisement

ZALR ACC,loc16
ZALR ACC,loc16
SYNTAX OPTIONS
ZALR ACC,loc16
Operands
ACC
loc16
Description
Flags and
N
Modes
Z
Repeat
Example
; Calculate: Y = round(M*X << 1 + B << 16)
; Y, M, X, B are all Q15 numbers
SPM
MOV
MPY
ZALR
ADDL
MOV
6-394
Accumulator register
Addressing mode (see Chapter 5)
Load low accumulator (AL) with the value 0x8000 and load high accumulator
(AH) with the 16-bit contents pointed to by the "loc16" addressing mode.
AH = [loc16];
AL = 0x8000;
The load to ACC is tested for a negative condition. If bit 31 of ACC is 1, then
the negative flag bit is set; otherwise it is cleared.
The load to ACC is tested for a zero condition. The zero flag bit is set if the
operation generates ACC = 0; otherwise it is cleared
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
+1
T,@M
P,T,@X
ACC,@B
ACC,P << PM
@Y,AH
Zero AL and Load AH With Rounding
OPCODE
0101 0110 0001 0011
0000 0000 LLLL LLLL
; Set product shift mode to << 1
; T = M
; P = M * X
; ACC = B << 16 + 0x8000
; Add P to ACC with shift (Q31)
; Store AH into Y
OBJMODE
RPT
CYC
1
1
(Q15)
(Q30)
(Q31)
(Q15)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents

Save PDF