I try to debug simple code
static void com_isr (void) interrupt 4 using 1 { unsigned char data c; /*- Received data interrupt. -*/ if (RI) { c = SBUF; RI = 0; ... ... } }
I think the debugger assumes that 'C' is the Carry flag - there was a thread about this recently. Try renaming your local variable (you're not writing BASIC now!)
The carry flag is normally CY and I know that I have used a variable name of c without any problems. I suspect the optimiser. Look at the assembly code (in the xxx.cod listing), I expect that you will find that c is assigned to a register. This seems to give the debugger some problems when it tries to find a value. A couple of ideas: Try defining c as a static or volatile or try turning the level of optimisation right down.
Thank You, Graham. With c defined as static debuger work fine. But what about local variables in the "Locals" page of "Watch" window? I don't see them.