Logo 
Search:

Assembly Language Articles

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

PROGRAM TO FIND THE ADDITION OF N 16 BIT NO

Posted By: Giovanna Silva     Category: Assembly Language     Views: 9521

WRITE A PROGRAM TO FIND THE ADDITION OF N 16 BIT NO.

Code for PROGRAM TO FIND THE ADDITION OF N 16 BIT NO in Assembly Language

DATA SEGMENT
A DW 1,2,3,4,5,6,7,8,9,10
DATA ENDS
CODE SEGMENT
         ASSUME DS:DATA,CS:CODE
START:
        MOV AX,DATA
        MOV DS,AX
        MOV CL,10
        LEA BX,A
        MOV AX,00
    L1: ADD AX,WORD PTR[BX]
        ADD BX,02
        DEC CL
        CMP CL,00
        JNZ L1
        MOV AH,4CH
        INT 21
CODE ENDS
END START

;OUTPUT:->
;-R
;AX=0000  BX=0000  CX=003D  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0B98  ES=0B98  SS=0BA8  CS=0BAA  IP=0000   NV UP EI PL NZ NA PO NC
;0BAA:0000 B8A80B        MOV     AX,0BA8
;-T
;
;AX=0BA8  BX=0000  CX=003D  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0B98  ES=0B98  SS=0BA8  CS=0BAA  IP=0003   NV UP EI PL NZ NA PO NC
;0BAA:0003 8ED8          MOV     DS,AX
;-T
;
;AX=0BA8  BX=0000  CX=003D  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BA8  ES=0B98  SS=0BA8  CS=0BAA  IP=0005   NV UP EI PL NZ NA PO NC
;0BAA:0005 B10A          MOV     CL,0A
;-T
;
;AX=0BA8  BX=0000  CX=000A  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BA8  ES=0B98  SS=0BA8  CS=0BAA  IP=0007   NV UP EI PL NZ NA PO NC
;0BAA:0007 BB0000        MOV     BX,0000
;-T
;
;AX=0BA8  BX=0000  CX=000A  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BA8  ES=0B98  SS=0BA8  CS=0BAA  IP=000A   NV UP EI PL NZ NA PO NC
;0BAA:000A B80000        MOV     AX,0000
;-G CS: 0019
;
;AX=0037  BX=0014  CX=0000  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BA8  ES=0B98  SS=0BA8  CS=0BAA  IP=0019   NV UP EI PL ZR NA PE NC
;0BAA:0019 B44C          MOV     AH,4C

  
Share: 


Didn't find what you were looking for? Find more on PROGRAM TO FIND THE ADDITION OF N 16 BIT NO Or get search suggestion and latest updates.

Giovanna Silva
Giovanna Silva author of PROGRAM TO FIND THE ADDITION OF N 16 BIT NO is from Salvador, Brazil.
 
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!