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.
the scribbles look ok (code has comments) do you have external RAM attached?
Erik
Sir i am running this code on C-Keil itself and i access internal memory by writing addresses in memory window. for ex: internal ram i:30H and external ram by simply.. c:0x3000
I repeat
do you have external RAM attached?
or does i am running this code on C-Keil itself mean you are simulating?
Sir, i got my mistake i was accessing code memory instead of external memory by writing C:3000h i should write X:3000h in the memory address window to access external memory. thank you sir