Dear All, I have written a c program like:
char Read(unsigned char ucdevice,unsigned char ucaddress) { int iNo_data = 0; // some code here }
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
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? No. The contents of the flash are
0x8285 E4 0x8286 90 0x8287 01 0x8288 37 0x8289 F0 0x828A A3 in both of your examples. Take a look the actual adresses. What changes is how the IDE interprets the contents. I would guess that the single-stepping messes up the interpretation algorithm somehow.
in both of your examples. Take a look the actual adresses. What changes is how the IDE interprets the contents. I would guess that the single-stepping messes up the interpretation algorithm somehow.
What processor are you using, and how are you debugging it?
...What changes is how the IDE interprets the contents. I would guess that the single-stepping messes up the interpretation algorithm somehow... How could it happen so? Is there any way to avoid this?what I have to do? ...Whatprocessor you are using... I am using c8051f120. ...How you are debugging... using EC2,connect to my target, download the code, place a breakpoint,run upto the breakpoint,goto the dissassembly window, perform step by step execution by pressing F11.
...I would guess that the single-stepping messes up the interpretation algorithm somehow.... No, the complete execution also behaves in the same manner.