MOV loc16,ACC << 1..8
6-167
MOV loc16,ACC << 1..8
Save Low Word of Shifted Accumulator
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
MOV loc16, ACC << 1
1011 0001 LLLL LLLL
1
Y
N+1
MOV loc16, ACC << 2..8
0101 0110 0010 1101
0000 0SHF LLLL LLLL
1
Y
N+1
1011 1SHF LLLL LLLL
0
−
1
Operands
loc16
Addressing mode (see Chapter 5)
ACC
Accumulator register
#1..8
Shift value
Description
Load the content of the location pointed to by the “loc16” addressing mode
with the low word of the ACC register after left
−
shifting by the specified value.
The ACC register is not modified:
[loc16] = ACC >> (16 − shift value); [loc16] = low (ACC
<<1...8)
Flags and
Modes
N
If (loc16 = @AX), then after the load AX is checked for a negative condition.
The N flag is set if bit 15 of the AX is 1; else N is cleared.
Z
If (loc16 = @AX) then after the load AX is checked for a zero condition. The Z
flag is set if AX is zero; else Z is cleared.
Repeat
If the operation is repeatable, then the instruction will be executed N+1
times. The state of the Z and N flags will reflect the final result. If the operation
is not repeatable, the instruction will execute only once.
Example
; Multiply two Q15 numbers (VarA and VarB) and store result in
; VarC as a Q15 number:
MOV T,@VarA
; T = VarA (Q15)
MPY ACC,T,@VarB
; ACC = VarA * VarB (Q30)
MOVH @VarC,ACC << 1
; VarC = ACC >> (16−1) (Q15)
; VarC as a Q31 number:
MOV T,@VarA
; T = VarA (T = Q14)
MPY ACC,T,@VarB
; ACC = VarA * VarB (ACC = Q28)
MOV @VarC+0,ACC << 3
; VarC low = ACC << 3
MOVH @VarC+1,ACC << 3
; VarC high = ACC >> (16−1) (VarC = Q31)
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...