Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

Program to multiply two 32-bit numbers and store answer in memory

Posted By: Vidos Fischer     Category: Assembly Language     Views: 22981

Write a program to multiply two 32-bit numbers and store answer in memory.

Code for Program to multiply two 32-bit numbers and store answer in memory in Assembly Language

.model small

.data
        mult1 dw 2521H
              dw 3206H
        mult2 dw 0A26H
              dw 6400H
        ans   dw 0,0,0,0

.code
        mov ax,@data
        mov ds,ax

;       LEA SI,ans

        mov ax,mult1
        mul mult2
        mov ans,ax
        mov ans+2,dx

        mov ax,mult1+2
        mul mult2
        add ans+2,ax
        adc ans+4,dx
        adc ans+6,0

        mov ax,mult1
        mul mult2+2
        add ans+2,ax
        adc ans+4,dx
        adc ans+6,0

        mov ax,mult1+2
        mul mult2+2
        add ans+4,ax
        adc ans+6,dx

        mov ax,4C00h
        int 21h
end
  
Share: 



Vidos Fischer
Vidos Fischer author of Program to multiply two 32-bit numbers and store answer in memory is from Frankfurt, Germany.
 
View All Articles

 

Other Interesting Articles in Assembly Language:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!