This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

External RAM access using assembly language in keil

i want to move a block of five bytes stored at locations 3000h, 3001h, 3002h, 3003h and 3004h of external RAM to locations 40h, 41h, 42h, 43h and 44h of internal RAM.

3000H 4AH 40H ?
3001H 34H 41H ?
3002H F2H 42H ?
3003H 55H 43H ?
3004H 77H 44H ?

for this particular problem i have written the following code in assembly language:

ORG 0000
MOV DPH, #30H
MOV DPL, #00H
MOV R0, #40H
MOV R1, #05H
BACK:
MOVX A, @DPTR
MOV @R0, A
INC DPL
INC R0
DJNZ R1, BACK
HERE: SJMP HERE
END

but when i run it the data from the location pointed by dptr doesnt move to the destined location. Plz help me to rectify this problem.

0