Working on...

your queries, use contact form

17 Mar 2025

Practical No. 7: Array data transfer from source locations to destination locations (MAA)

;MAA (Microcontroller and application) 314328

;Practical No. 7: Array data transfer from source locations to destination

;locations

 

;Write a program to transfer a block of 05 bytes from internal data

;memory location 30H onwards to external data memory location 2000H onwards

;Special Note: Memory location 20h is given in program, but it is assigned to ;bit addressable memory hence 30h is taken here, kindly note.

 

ORG 0000H

MOV R0, #05H ; initialize counter

MOV R1, #30H ; initialize the source memory location higher byte

MOV R2, #20H ; initialize the destination memory location higher byte

MOV R3, #00H ; initialize the destination & source location lower byte

BACK: MOV DPH, R2 ; get the source memory location address to DPTR

MOV DPL, R3

MOV A,@R1

MOVX @DPTR,A ; get the data from source memory to destination memory

INC R1 ; increment to next source memory

INC R3 ; increment to next destination memory

DJNZ R0, BACK ; decrement count. If count is non zero, go to label “BACK”

SJMP $

END


No comments:

Post a Comment