Assembly language program to Multiply two numbers inputs from user
Code
org 100h.stack 100h
.data
.code
main proc
mov ah,01
int 21h
mov bl,al
sub bl,48
mov ah,01
int 21h
sub al,48
mul bl
AAM ;used for divide result of ax in ah and al respectly (first,second digit)
mov ch,ah
mov cl,al
;code for space
mov dx,10
mov ah,02
int 21h
mov dx,13
mov ah,02
int 21h
;displaying result
mov dl,ch
add dl,48
mov ah,02
int 21h
mov dl,ch
add dl,48
mov ah,02
int 21h
mov dl,cl
add dl,48
mov ah,02
int 21h
main endp
end main
end main
Output
First Number is 3 and Second number is 2
Comments
Post a Comment