HI,
8052 has 256 bytes of RAM . I am having trouble accessing the last 128 bytes directly. I have read help but nowhere is it that the last 128 bytes cannot be accessed directly. How can I access the last 128 bytes directly?
ayan
To address (indirect) the upper half you can use both R0 and R1 registers and the address range is 80h to FFh:
MOV R0(1), address
and then
MOV A, @R0 (1)
MOV @R0(1), A
MOV direct, @R0 (1)
MOV @R0(1), direct
MOV @R0(1), #DATA
Good idea is to locate SP in the upper half
MOV SP, #90h (or other)
Never accessibility!
Because last 128bytes in directly mode is located all of register area.
And so on, you only access last 128bytes general purpose RAM with indirectly mode (the same as pointer).