MOV loc16,P
MOV loc16,P
SYNTAX OPTIONS
MOV loc16,P
Operands
loc16
P
Description
Flags and
N
Modes
Z
PM
Repeat
Example
; Calculate Y32 = M16*X16 >> 6
MOV
MPY
SPM
MOV
MOVH @Y32+1,P
6-174
Addressing mode (see Chapter 5)
Product register
The contents of the P register are shifted by the amount specified in the
product shift mode (PM), and the lower half of the shifted value is stored into
the 16-bit location pointed to by the "loc16" addressing mode. The P register
is not modified by the operation:
[loc16] = P << PM;
If (loc16 = @AX) and bit 15 of the AX register is 1, then the N bit is set;
otherwise, N is cleared.
If (loc16 = @AX) and the value of AX after the load is zero, then the Z bit is
set; otherwise Z is cleared.
The value in the PM bits sets the shift mode for the output operation from the
product register. If the product shift value is positive (logical left shift
operation), then the low bits are zero filled. If the product shift value is
negative (arithmetic right shift operation), the upper bits are sign extended.
This instruction is repeatable. If the operation follows a RPT instruction, then
it will be executed N+1 times. The state of the Z, and N flags will reflect the
final result.
T,@M16
P,T,@X16
−6
@Y32+0,P
Store Lower Half of Shifted P Register
OPCODE
0011 1111 LLLL LLLL
; T = M
; P = T * X
; Set product shift to >> 6
; Y32 = P >> 6
OBJMODE
RPT
CYC
X
Y
N+1
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?