Logo 
Search:

Assembly Language Articles

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

PROGRAM TO COPY ONE ARRAY TO ANOTHER ARRAY

Posted By: Bittan Fischer     Category: Assembly Language     Views: 12461

WRITE A PROGRAM TO COPY ONE ARRAY TO ANOTHER ARRAY.

Code for PROGRAM TO COPY ONE ARRAY TO ANOTHER ARRAY in Assembly Language

DATA SEGMENT
A DB 1,2,3,4,5,6,7,8,9,10
B DB 10 DUP(0)
DATA ENDS
CODE SEGMENT
         ASSUME DS:DATA,CS:CODE
START:
      MOV AX,DATA
      MOV DS,AX
      MOV CL,10
      LEA BX,A
      LEA SI,B
  L1: MOV CH,BYTE PTR[BX]
      MOV BYTE PTR[SI],CH
      MOV DH,BYTE PTR[SI]
      INC BX
      INC SI
      DEC CL
      CMP CL,00
      JNZ L1
      MOV AH,4CH
      INT 21H
CODE ENDS
END START

;OUTPUT:->
;-D DS: 0000 L0A
;0BA8:0000  01 02 03 04 05 06 07 08-09 0A
;-D DS: 000A L0A
;0BA8:0000                                01 02 03 04 05 06
;0BA8:0010  07 08 09 0A

  
Share: 


Didn't find what you were looking for? Find more on PROGRAM TO COPY ONE ARRAY TO ANOTHER ARRAY Or get search suggestion and latest updates.

Bittan Fischer
Bittan Fischer author of PROGRAM TO COPY ONE ARRAY TO ANOTHER ARRAY 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!