Multiplying numbers
•[b] := [b] * 2
•
• Means multiply the number at the location (address) “b” by 2
•
•In C language we write:
•
• b =  b * 2;
• b *= 2;
•
•In assembly language we use instruction imul (integer multiply)
•
•In assembly language we write:
•
• imul [b]
• mov  [b], rax 
•
• Means [b] := [b] * rax, so we have to put 2 into rax, but we already have 2 in rax
• Result of multiplication is put into registers rax and rdx
•
•In WinDbg disassembly output we see:
•
• imul qword ptr [ArithmeticProject!b (0000000000404008)]
• mov [ArithmeticProject!b (0000000000404008)],rax
•