Assembly Language Articles

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

Add two numbers

Posted By: Huberta Miller     Category: Assembly Language     Views: 213197

Write a program to add two numbers.

Code for Add two numbers in Assembly Language

.model small
 opr1 dw 1234h
 opr2 dw 0002h
 result dw 01 dup(?),'$'
        mov ax,@data
        mov ds,ax
        mov ax,opr1
        mov bx,opr2
        add ax,bx
        mov di,offset result
        mov [di], ax

        mov ah,09h
        mov dx,offset result
        int 21h

        mov ah,4ch
        int 21h

Didn't find what you were looking for? Find more on Add two numbers Or get search suggestion and latest updates.

Huberta Miller
Huberta Miller author of Add two numbers is from Frankfurt, Germany.
View All Articles

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!