MOV PM, AX
6-179
MOV PM, AX Load Product Shift Mode
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
MOV PM, AX 0101 0110 0011 100A 1 − 1
Operands
AX
Accumulator high (AH) or accumulator low (AL) registers.
Description Load the product shift mode (PM) bits with the 3 least significant bits of
register AX.
PM = AX(2:0);
Flags and
Modes
PM
The product shift mode bits are loaded with the 3 least significant bits of
AX.
Repeat This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
; Calculate: Y32 = (M16*X16 >> Shift) + B32, Shift = 0 to 6
CLRC AMODE ; Make sure AMODE = 0
MOV AL,@Shift ; Load AL with contents of ”Shift”
ADDB AL,#1 ; Convert ”Shift” to PM encoding
MOV PM,AX ; Load PM bits with encoded ”Shift” value
MOV T,@X16 ; T = X16
MPY P,XT,@M16 ; P = X16*M16
MOVL ACC,@B32 ; ACC = B32
ADDL ACC,P << PM ; ACC = ACC + (P >> Shift)
MOVL @Y32,ACC ; Store result into Y32