Logo 
Search:

Assembly Language Articles

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

Program to add series of numbers

Posted By: Vida Fischer     Category: Assembly Language     Views: 14153

Program to add series of numbers.

Code for Program to add series of numbers in Assembly Language

.model small
.data
 numlist db 52h,23h,11h,22h
 count equ 4d
 
 result dw 01 dup(?),'$'
.code
        mov ax,@data
        mov ds,ax

        mov cx,count
        xor ax,ax
        xor bx,bx
        mov si, offset numlist
 again: mov bl,[si]
        add ax,bx
        inc si
        dec cx
        jnz again
        mov di,offset result
        mov [di],ax

        mov ah,4ch
        int 21h
        end
  
Share: 


Didn't find what you were looking for? Find more on Program to add series of numbers Or get search suggestion and latest updates.

Vida Fischer
Vida Fischer author of Program to add series of 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!