You don't multiply 0x10C by 16, you multiply what's at address 0x10C, which is 0x11, by 16. And that gives you 0x110 (or 272).
ATT assembly language arithmetic
Question
Address Value Register Value
0x100 0xFF %eax 0x100
0x104 0xAB %ecx 0x1
0x108 0x13 %edx 0x3
0x10C 0x11
Instruction Destination Value
imull $16, (%eax, %edx, 4) ___________ _____
I keep getting 0x10C as the destination (which is correct). But for some reason when I multiply 10C * 16 (source * destination) I get 1708 which is incorrect. Can someone please help me? Thank you!
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow