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

Bug in debugger or compiler?

I have a slight problem with the following code:

unsigned char code * code x[] = {"a", "b", "c"};

void main() {

	unsigned char a;

	for(;;) a = x[0][0];
}

The device used is the Philips 8xC51MB2. After building it and starting a debug session with a and x[0][0] in the watch window, I find that although the variable a takes on the value of 0x61 in the endless loop, x[0][0] always shows the value zero.

When I change the device to some other device such as the Philips 8xC52, x[0][0] shows the correct value of 0x61.

Can anyone else verify this and let me know if it is a bug with the debugger or the compiler?

Thanks.

0