8086 Microprocessor ALP Program To Multiply Two 8 Bit Numbers


Aim
Write a program to perform multiplication of 8 bit numbers
Program
assume cs:code,ds:data
data segment
m1 db 0ah,0dh,"enter no 1 $"
m2 db 0ah,0dh,"enter no 2 $"
m3 db 0ah,0dh,"result:$"
data ends
code segment
start:mov ax,data
mov ds,ax
lea dx,m1
mov ah,09h
int 21h
mov ah,01h
int 21h
mov bh,al
mov ah,01h
int 21h
mov bl,al
sub bx,3030h
mov ax,bx
aad
mov bl,al
lea dx,m2
mov ah,09h
int 21h
mov ah,01h
int 21h
mov ch,al
mov ah,01h
int 21h
mov cl,al
sub cx,3030h
mov ax,cx
aad
mul bl
mov bx,ax
lea dx,m3
mov ah,09h
int 21h
mov ax,bx
mov cx,03e8h
mov dx,0000h
div cx
mov bx,dx
add al,30h
mov dl,al
mov ah,02h
int 21h
mov ax,bx
mov dx,0000h
mov cx,0064h
div cx
mov bx,dx
add al,30h
mov dl,al
mov ah,02h
int 21h
mov ax,bx
mov dx,0000h
mov ch,0ah
div ch
mov bh,ah
add al,30h
mov dl,al
mov ah,02h
int 21h
add bh,30h
mov dl,bh
mov ah,02h
int 21h
mov ah,4ch
int 21h
code ends
end start

No comments:

Post a Comment

Post Your valuable comments here ..........