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,cl
        add dl,48
        mov ah,02
        int 21h
 main endp
end main

Output

First Number is 3 and Second number is 2


Comments

Popular posts from this blog

Assembly language program to input an integer from user and display whether the number is even or odd

Assembly language program to input string from user and display it

Assembly language program to input string from user and display its length