8051 ASM - copy from xmemory to xmemory
Discussion in "8051 Discussion Forum" started by dbendov Apr 6, 2014.
Sun Apr 06 2014, 03:17 pm
Hi all,
I am trying to copy a block of fata from one of my external memory to another.
The problem is, that there is only one dptr => i can't use a loop.
The dst exmemory address is fixed and doesn't change.
is there anyway to overcome this problem?
I am trying to copy a block of fata from one of my external memory to another.
The problem is, that there is only one dptr => i can't use a loop.
The dst exmemory address is fixed and doesn't change.
is there anyway to overcome this problem?
Mon Apr 07 2014, 11:24 am
You can use 8-bit Data pointers if your size of block is less than 256 bytes. use instruction:
MOVX A, @Ri
where Ri can be R0 or R1
so you can access address range from XX00 to XXFFH, XX is MSB which can be configured prior to reading/writing on Port 2.
else you need to maintain memory addresses somewhere in RAM if using one DPTR.
MOVX A, @Ri
where Ri can be R0 or R1
so you can access address range from XX00 to XXFFH, XX is MSB which can be configured prior to reading/writing on Port 2.
else you need to maintain memory addresses somewhere in RAM if using one DPTR.
Powered by e107 Forum System