Multiplying in Assembly

dsptl's Avatar, Join Date: Jun 2009
Light Poster
How can you multiply the content of register %o0 by 15 without calling .mul or ading %o0 to itself 15 times in Assembly?
xpi0t0s's Avatar, Join Date: Aug 2004
Shift it left 4 times (equivalent to multiplying by 16) and subtract the original value.

0x0012 << 4 = 0x0120

Last edited by xpi0t0s; 2Jul2009 at 15:09..