IP2022 Users ManualInstruction Set Architecture
www.ubicom.com
179
Example:
muls w,#0x75
This example multiplies the contents of W by the
literal 0x75 into W. The high byte of the result is
loaded into the MULH register, and the low byte is
loaded into W.
If W holds 0x07 and lit8 is 0x06, the result loaded
into MULH || W will be 0x002A (42 decimal).
If W holds 0xF9 (-7 decimal) and lit8 is 0x06, the
result loaded into MULH || W will be 0xFFD6 (-42
decimal).
If W holds 0xF9 (-7 decimal) and lit8 is 0xFA (-6
decimal), the result loaded into MULH || W will be
0x002A (42 decimal).