Multiplication in assembly language without using MUL function | COAL | Assembly Language
Code:
.model small
.stack 100h
.data
multiplier db 5
multiplicand db 13
Product db 0
.code
mov ax,@data
mov ds,ax
xor ax,ax
lea si, multiplier
lea di, multiplicand
lea bx, product
mov cx,4
L1:
shr [si],1 ;multiplier shift right by 1
jnc skip
mov dx,[di]
add [bx],dx
skip:
shl [di],1 ;multiplicand shift left by 1
loop L1
.exit