; Binary Multiplication (BMult.asm)
; This program demonstrates binary multiplication using SHL.
; It multiplies intval by 36, using SHL instructions.
INCLUDE Irvine32.inc
.data
intval DWORD 123
.code
main PROC
mov eax,intval
mov ebx,eax
shl eax,5 ; multiply by 32
shl ebx,2 ; multiply by 4
add eax,ebx ; sum the products
call DumpRegs
call WaitMsg;
exit
main ENDP
END main
037.利用移位操作计算乘法
最新推荐文章于 2024-01-20 06:45:00 发布