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

Interrupt using function issue.

My Interrupt_1 C code

void EXTERNAL_INT_1 (void) interrupt 2 using 1
{
TEST();
}

TEST()
{
if(A=B){
          if( C.K[0]==D[0]&&C.K[1]==D[1]&&
              C.K[2]==D[2]&&C.K[3]==D[3]&&
              C.K[4]==D[4]&&C.K[5]==D[5])
                {
           if( C.L[0]==E[0]&&C.L[1]==E[1]&&
              C.L[2]==E[2]&&C.L[3]==E[3]&&
              C.L[4]==E[4]&&C.L[5]==E[5])
                  {success==1;}
                }
       }
}


after Compilted and into Debug mode I found the assembler code compare value use XRL A,R6
but until C.L[3]==E[3], the assember code become CJNE A,0x06,C:xxxx ,it's a problem when running program because it read 0x06 is bank 0.
How to slove it . Thanks a lot.

0