Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
© 2005-2011 Microchip Technology Inc. DS70157F-page 319
Section 5. Instruction Descriptions
Instruction
Descriptions
5
MUL.UU
Integer 16x16-bit Unsigned Short Literal Multiply
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X X X X X
Syntax: {label:} MUL.UU Wb, #lit5, Wnd
Operands: Wb ∈ [W0 ... W15]
lit5 ∈ [0 ... 31]
Wnd ∈ [W0, W2, W4 ... W12]
Operation: unsigned (Wb) * unsigned lit5 → Wnd:Wnd + 1
Status Affected: None
Encoding:
1011 1000 0www wddd d11k kkkk
Description: Multiply the contents of Wb with the 5-bit literal, and store the 32-bit
result in two successive working registers. The least significant word of
the result is stored in Wnd (which must be an even numbered working
register), and the most significant word of the result is stored in Wnd + 1.
Both operands and the result are interpreted as unsigned integers.
Register direct addressing must be used for Wb and Wnd.
The ‘w’ bits select the address of the base register.
The ‘d’ bits select the address of the lower destination register.
The ‘k’ bits define a 5-bit unsigned integer literal.
Note 1: This instruction operates in Word mode only.
2: Since the product of the multiplication is 32 bits, Wnd must be
an even working register. See Figure 4-3 for information on
how double words are aligned in memory.
3: Wnd may not be W14, since W15<0> is fixed to zero.
4: The IF bit and the US<1:0> bits in the CORCON register have
no effect on this operation.
Words: 1
Cycles: 1
Example 1:
MUL.UU W0, #0xF, W12 ; Multiply W0 by literal 0xF
; Store the result to W12:W13
Before
Instruction
After
Instruction
W0 2323 W0 2323
W12 4512 W12 0F0D
W13 7821 W13 0002
SR 0000 SR 0000
Example 2:
MUL.UU W7, #0x1F, W0 ; Multiply W7 by literal 0x1F
; Store the result to W0:W1
Before
Instruction
After
Instruction
W0 780B W0 55C0
W1 3805 W1 001D
W7 F240 W7 F240
SR 0000 SR 0000
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ64GA004-Programmers_Reference_Manual.pdf