avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Assembler error message


From: Robert Rozman
Subject: Re: [avr-gcc-list] Assembler error message
Date: Fri, 16 Mar 2001 21:50:37 +0100

Hello,

thanks for response. Only one short question:
- I'd like macro CLEARBIT_CONST to influence value of variable 'var'. Do I
have to add something to output section of macro too - as it is now, it
seems like it doesn't have any output or influence on variable.

Thanks in advance,

Robert Rozman

-----Izvorno sporońćilo-----
Od: Denis Chertykov <address@hidden>
Za: Robert Rozman <address@hidden>
Kp: address@hidden <address@hidden>
Datum: 16. marec 2001 20:17
Zadeva: Re: [avr-gcc-list] Assembler error message



>Try to use:
>
>#define CLEARBIT_CONST(var,mask) \
> asm volatile (\
>  "andi %0, lo8(0xff - (%1)) "\
>  : /* no outputs */\
>   : "r" ((u08) (var)), \
>    "i" ((u08) (mask)) \
>       )
>
>
>Or:
>
>#define CLEARBIT_CONST(var,mask) \
> asm volatile (\
>  "cbr %0, %1) "\
>  : /* no outputs */\
>   : "r" ((u08) (var)), \
>    "i" ((mask)) /* <-------- type casting to u08 removed */ \
>       )





reply via email to

[Prev in Thread] Current Thread [Next in Thread]