[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] C code calling ASM functions
From: |
Gre7g Luterman |
Subject: |
Re: [avr-gcc-list] C code calling ASM functions |
Date: |
Fri, 25 Jan 2008 08:48:16 -0800 (PST) |
--- David Brown <address@hidden> wrote:
> You really should do some basic search, and read the
> avr gcc and
> avr-libc documentation before posting - you might
> not find all your
> answers, but it will cover most things.
>
>
http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage
>
http://www.nongnu.org/avr-libc/user-manual/group__asmdemo.html
>
http://www.nongnu.org/avr-libc/user-manual/assembler.html
>
http://www.nongnu.org/avr-libc/user-manual/inline_asm.html
Hey! That's a great list of resources. However, I
was reading through the first one and I think there's
an error in the FAQ near the end. It says:
"...8-bit return values are zero/sign-extended to 16
bits by the caller..."
IIRC, it is actually the responsibility of the called
function (the callee) to clear r25 when returning an
unsigned byte. The caller can presume this to be
clear already.
Can someone correct this?
Gre7g
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com