MOVH loc16,ACC << 1..8
MOVH loc16,ACC << 1..8
SYNTAX OPTIONS
MOVH loc16, ACC << 1
MOVH loc16, ACC << 2..8
Operands
loc16
ACC
#1..8
Description
Flags and
N
Modes
Z
Repeat
Example
; Multiply two Q15 numbers (VarA and VarB) and store result in
; VarC as a Q15 number:
MOV
MPY
MOVH
; VarC as a Q31 number:
MOV
MPY
MOV
MOVH
6-202
Addressing mode (see Chapter 5)
Accumulator register
Shift value
Load the content of the location pointed to by the "loc16" addressing mode
with the high word of the ACC register after left−shifting by the specified
value. The ACC register is not modified:
[loc16] = ACC >> (16 − shift value);
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.
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.
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.
T,@VarA
ACC,T,@VarB
@VarC,ACC << 1
T,@VarA
ACC,T,@VarB
@VarC+0,ACC << 3
@VarC+1,ACC << 3
Save High Word of Shifted Accumulator
OPCODE
1011 0011 LLLL LLLL
0101 0110 0010 1111
0000 0SHF LLLL LLLL
1011 0SHF LLLL LLLL
; T = VarA
; ACC = VarA * VarB
; VarC = ACC >> (16−1) (Q15)
; T = VarA
; ACC = VarA * VarB
; VarC low
= ACC << 3
; VarC high = ACC >> (16−1) (VarC = Q31)
OBJMODE
RPT
CYC
1
Y
N+1
1
Y
N+1
0
−
1
(Q15)
(Q30)
(T = Q14)
(ACC = Q28)
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?