Hi,
I am trying to run a simple assembly 8051 program in uVision 5.
While running the program, I found that the register window is not updating while single stepping.
Could you help resolve the issue?
Thanks,
Santosh
Santosh Kumar said:While running the program, I found that the register window is not updating while single stepping.
This is because your program does not update any register and therefore you still see 0 in R0 and ACC! I guess you forgot to specify the '#' (immediate) to load absolute values:
org 0x00 jmp 0x40 org 0x40 mov r0,#0x45 mov a,#0xfb add a,r0 lst: jmp lst
Thanks, Hans!
This did it for me. Was my silly mistake.
But, I wonder why the assembler didn't flag this as a syntax error!
Your program is syntactically correct and therefore you don't get a syntax error. A 'mov r0,0x45' (without #) moves the value from internal RAM address 0x45 to R0. Since this memory byte has the value 0, you did not see any change in the register window.
Thanks for sharing this. I stand cleared.