[Top][All Lists]

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

Re: [avr-gcc-list] efficiency of assigning bits

From: Daniel O'Connor
Subject: Re: [avr-gcc-list] efficiency of assigning bits
Date: Mon, 14 Mar 2005 22:20:04 +1030
User-agent: KMail/1.7.92

On Mon, 14 Mar 2005 20:29, Jamie Morken wrote:
> What does that work out to in assembly?  A cbi/sbi assembly instruction is
> 2 clock cycles.  I still don't understand why these instructions would be
> taken out of winavr, they obviously are useful for them to have been
> included as opcodes in the AVR! :)

The compiler still generates those instructions..
The PORTA &= 0x1 type of construct is portable to other compilers and 
architectures without any changes.

As you say, if it really bothers you, you can use inline assembly.

Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

Attachment: pgpLP9WSxSAhq.pgp
Description: PGP signature

reply via email to

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