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

Help with movx @r0,a comman and C51,disable XRAM

Hello i have wrote the above code but i use inline assembly to... is any other better way to get the same result ?
i try to read busy flag from a glcd and switch block


void block(unsigned char cs)
{
    bit busy = 1;
        if(cs == 1)
                cs1=1;
        else
                cs2=1;

         #pragma asm
                mov auxr,#0x0e  ;disable XRAM from 0x00 to 0xff
                mov r0,#check_status
                busy:
                movx a,@r0                      ;read busy flag
                jb acc.7,busy
                mov auxr,#0x0c  ;enable XRAM
         #pragma endasm

          cs1=0;
          cs2=0;
}

thanks a lot