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

MOV in ASM

if my ASM code is previously coded to run for 256Byte internal RAM of MCU (use MOV instruction)
and i now need to change to external 2Kbyte RAM (use MOVX), then should i change R7 to R7:R6 because R7 is
not big enought to address BUFFER? or can anyone suggest what should i change the following code?

unsigned char Test(unsigned char BUFFER)
{

#pragma asm

MOV A, R7
MOV R1, A
RET

#pragma endasm
return 1;
}

Parents
  • But R1 in RB0 has physical address 0x01,
        R1 in RB1 has physical address 0x09,
        R1 in RB2 has physical address 0x11, and
        R1 in RB3 has physical address 0x19.

    The example is effectively R1 = BUFFER. What 8051 has registers allocated to memory accessible via MOVX?

Reply
  • But R1 in RB0 has physical address 0x01,
        R1 in RB1 has physical address 0x09,
        R1 in RB2 has physical address 0x11, and
        R1 in RB3 has physical address 0x19.

    The example is effectively R1 = BUFFER. What 8051 has registers allocated to memory accessible via MOVX?

Children
No data