Please note, this is just illistrating the exor compare, nothing more. Using S08 processors, 5.9.0 codewarrior.
If i do somthing like this, it works (dont use the predefined PTAD_PTAD1 directly):
if(PTAD_PTAD1 ^ PTAD_PTAD2) dothis(); //If both the same dothis()else dothis1(); //If one bit is different dothis1()
I am guessing its due to the way the PTAD_PTAD1 is setup in the header files? Whats the best way to do this without it getting so ugly?
uchar Temp1, Temp2;if(PTAD_PTAD1) Temp1 = 1;else Temp1 = 0if(PTAD_PTAD2) Temp2 = 1;else Temp2 = 0if(Temp1 ^ Temp2) dothis();else dothis1();
Again, sorry if this is a simple lesson that I should already know.
Message Edited by CarlFST60L_3rd on 2008-06-10 11:38 AM