0% found this document useful (0 votes)
9 views

Mic PR 4

Uploaded by

arqamqazi549
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Mic PR 4

Uploaded by

arqamqazi549
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Q.Assembly language program to mul two 8-bit and 16-bit numbers.

Program:-

SIGNED NUMBER UNSIGNED NUMBER


assume cs:code assume cs:code
assume ds:data assume ds:data
data segment data segment
a db 20h a db 20h
b db 30h b db -30h
c dw ? c dw ?
a1 dw 1224h a1 dw 1224h
b1 dw 3259h b1 dw -3259h
sum dd ? sum dd ?
ends data ends data
code segment code segment
start: start:
mov ax,data mov ax,data
mov ds,ax mov ds,ax
mov ax,0000h mov ax,0000h
mov al,a mov al,a
mov bl,b mov bl,b
mul bl mul bl
mov c,ax mov c,ax
mov ax,0000h mov ax,0000h
mov bx,0000h mov bx,0000h
mov ax,a1 mov ax,a1
mov bx,b1 mov bx,b1
imul bx imul bx
lea si,sum lea si,sum
mov [si],ah mov [si],ah
mov [si+1],al mov [si+1],al
mov [si+2],bh mov [si+2],bh
mov [si+3],bl mov [si+3],bl
int 3 int 3
ends code ends code
end start end start
output:-

You might also like