.model small
.stack 100h
.data
msg1 db "Enter first number:$"
msg2 db 10d,"Enter second number:$"
msg3 db 10d,"Multiplication is:$"
p1 db 0
p2 db 0
.code
mov ax,@data
mov ds,ax
mov ah,09h
mov dx,offset msg1
int 21h
mov ah,01h
int 21h
sub al,30h
mov p1,al
mov ah,09h
mov dx,offset msg2
int 21h
mov ah,01h
int 21h
sub al,30h
mov p2,al
mov ah,09h
mov dx,offset msg3
int 21h
mul p1
AAM
mov ch,ah
mov cl,al
mov dl,ch
add dl,48
mov ah,2
int 21h
mov dl,cl
add dl,48
mov ah,2
int 21h
mov ah,4ch
int 21h
end
Output:
.stack 100h
.data
msg1 db "Enter first number:$"
msg2 db 10d,"Enter second number:$"
msg3 db 10d,"Multiplication is:$"
p1 db 0
p2 db 0
.code
mov ax,@data
mov ds,ax
mov ah,09h
mov dx,offset msg1
int 21h
mov ah,01h
int 21h
sub al,30h
mov p1,al
mov ah,09h
mov dx,offset msg2
int 21h
mov ah,01h
int 21h
sub al,30h
mov p2,al
mov ah,09h
mov dx,offset msg3
int 21h
mul p1
AAM
mov ch,ah
mov cl,al
mov dl,ch
add dl,48
mov ah,2
int 21h
mov dl,cl
add dl,48
mov ah,2
int 21h
mov ah,4ch
int 21h
end
Output:
Comments
Post a Comment