Hi, i need to XOR couple of bytes. Im try to do it by this way:
pozice =0; adresa = 0x0A; data = 0x3F; data2 = 0x10; xdat =adresa ^ data ^ data2; //xdat = 0x25;
pozice =0; adresa = 0x0A; data = 0x3F; data2 = 0x10; xdat = adresa; xdat ^= data ; xdat ^= data2;//adresa ^ data ^ data2; xdat = 0x25;
It only takes about 5 minutes to see that what the Keil debugger is displaying and what is actually happening do not match up (This has been since the switch to realview). The compiler seems to be generating valid code for me. The (current) debugger is always confused as to where local variables and parameter are and where a line compiled code starts and ends in assembly. This is even with optimizations on the lowest setting.
OK I made copule other test and diasslembly ferquency output and i find this:
xdat = (data2 ^ data ^ adresa);
adresa = 0x0A; data = 0x3F; data2 = 0x90; xdat = (data2 ^ data ^ adresa); adresa = 0x0A; data = 0x3F; data2 = 0x90;
OK i fing my bug - just type unsigned char volatile data ..... Its my bug. Jirka