Assembly language program to multiply 2 numbers static inputs

Code

org 100h
.stack 100h
.data
.code
main proc
        mov al,2    ;first value
        mov bl,4    ;second value
        mul bl        ;multiply two number and result will save is ax

        AAM           ;we use this to solve the problem of numbers that is grater then 9

        mov ch,ah    ; now move all values in cx register
        mov cl,al

                                ;space
        mov dx,10
        mov ah,02
        int 21h
        mov dx,13
        mov ah,02
        int 21h

        mov dl,ch            ;now display values one by one
        add dl,48
        mov ah,02
        int 21h

        mov dl,cl
        add dl,48
        mov ah,02
        int 21h

        mov ah,4ch    
        int 21h

    main endp

end main

Output



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