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

How can I exchange two bits?

The following does not work (ACC is always 0, despite out[0] is 255):

ACC0 = out[0] & 1 == 1 ? 1 : 0;
ACC1 = out[0] & 2 == 2 ? 1 : 0;
out[0] &= 0xFC;
send_string(" acc1");
send_byte(ACC);
if (ACC0)
out[0] |= 2;
if (ACC1)
out[0] |= 1;

Parents Reply Children
No data