Multiplying in Assembly
|
Light Poster
|
|
| 2Jul2009,03:14 | #1 |
|
How can you multiply the content of register %o0 by 15 without calling .mul or ading %o0 to itself 15 times in Assembly?
|
|
Mentor
|
![]() |
| 2Jul2009,15:07 | #2 |
|
Shift it left 4 times (equivalent to multiplying by 16) and subtract the original value.
0x0012 << 4 = 0x0120 0x0120-0x0012=0x010e=0x0012*0x000f Last edited by xpi0t0s; 2Jul2009 at 15:09.. |

