MOVH loc16, P
6-203
MOVH loc16, P
Save High Word of the P Register
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
MOVH loc16,P
0101 0111 LLLL LLLL
X
Y
N+1
Operands
loc16
Addressing mode (see Chapter 5)
P
Product register
Description
The contents of the P register are shifted by the amount specified in the
product shift mode (PM), and the upper 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) >> 16;
Flags and
Modes
N
If (loc16 = @AX) and bit 15 of the AX register is 1, then the N bit is set;
otherwise, N is cleared.
Z
If (loc16 = @AX) and the value of AX after the load is zero, then the Z bit is
set; otherwise Z is cleared.
PM
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.
Repeat
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.
Example
; Calculate Y32 = M16*X16 >> 6
MOV T,@M16
; T = M
MPY P,T,@X16
; P = T * X
SPM −6
; Set product shift to >> 6
MOV @Y32+0,P
; Y32 = P >> 6
MOVH @Y32+1,P
Содержание 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...