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

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

[avr-gcc-list] Is it possible to implement...


From: Rune Christensen
Subject: [avr-gcc-list] Is it possible to implement...
Date: Mon, 30 Dec 2002 21:59:04 +0100

Hello

Is it possible to implement the following code in avr-gcc not using
assembler

if (carry(csumlo += data))
{
  if (carry(++csumhi))
  {
    csumlo++;
  }
}

Now it's implemented as

csumlo += data;
if (csumlo < data)
{
  if (++csumhi==0)
  {
    csumlo++;
  }
}

But I want to optimize it with the carry-bit

Thanks in advance

Rune Christensen

avr-gcc-list at http://avr1.org



reply via email to

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