Dirk Rapp wrote:
   Hello,

I have a little issue with "bitc".

If I use "P1OUT&= ~0x08;" I got "bic.b #8,&0x0021"
but if I use  "P1OUT&= ~0x80;" I got
mov.b #127, r15
and.b r15,&0x0021

with "P1OUT&= (uint8_t)~0x80; I got
and.b #127,&0x0021

P1OUT&= ~0x40    -->   and.b #-65,&0x0021

which is better but not the expected result.
It looks like it depends on the value( high nibble doesn't work).
- why is it
- how I can get the bic (not using inline assembler)

Any ideas?
You didn't say what -Ox you where using. But if -O0, I would expect the compiler to take the longest route possible. Longer than anyone doing assembly would think. But this works great for debugging.

Is that the case?

Best, Dan.


Reply via email to