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

Problem with assembly

Dear All,
I have written a c program like:

char Read(unsigned char ucdevice,unsigned char ucaddress)
{
  int iNo_data = 0;
// some code here

}


The assembly generated for the line 'int iNo_data = 0;' is,

C:0x8285    E4       CLR      A
C:0x8286    900137   MOV      DPTR,#0x0137
C:0x8289    F0       MOVX     @DPTR,A
C:0x828A    A3       INC      DPTR
C:0x828B    F0       MOVX     @DPTR,A

The logics are clear here. But when I do a step by step execution with breakpoints, after executing the address c:0x8286, the assembly generated changes as ,

C:0x8285    E4       CLR      A
C:0x8286    900137   MOV      DPTR,#0x0137
C:0x8287    0137     AJMP     C:8037
C:0x8289    F0       MOVX     @DPTR,A
C:0x828A    A3       INC      DPTR
C:0x828B    F0       MOVX     @DPTR,A

Is the FLASH is getting changed? If so how could a MOV instruction writes to the FLASH location?

I cant understand what is happening here.

Can anybody clarify this?

Thanks in advance,
-Neo

0