WAP to copy the content of table 1 which contains 10 numbers to table 2.

From Assembly Language Programming chapter in PU/ Microprocessor and Assembly Language Programming

Asked on 1 Jan, 2021

Like 0 Dislike 227 Views

Add a comment

1 Answers

arjun adhikari on 1 Jan, 2021 Like 0 Dislike

Lets suppose first table starts from address 9060H and second table starts from 9070H.

We load these addresses in HL and DE registers and use memory pointer(M) to copy contents. 

The program in 8085 is as such:

Address Label Mnemonics Hexcode
C000H   LXI H, 9060H  
C002H   ---------- 60H
C003H   ---------- 90H
C004H   LXI D, 9070H  
C005H   ---------- 70H
C006H   ---------- 90H
C007H   MVI C, 0AH  
C008H   ---------- 0AH
C009H copy MOV A, M  
C00AH   XCHG  
C00BH   MOV M, A  
C00CH   XCHG  
C00DH   INX H  
C00EH   INX D  
C010H   DCR C  
C011H   JNZ copy  
C012H   HLT  
Add a comment


Add your answer