[Top][All Lists]

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

Re: [avr-gcc-list] 2 tricky questions

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] 2 tricky questions
Date: Tue, 17 Jun 2003 10:56:49 +0200 (MET DST)

"Marko Panger AGB Lab" <address@hidden> wrote:

> 1) Is there a way to define an inline function declared in a assembler
> source ?

Sorry, i can't follow you.  ``inline function'' is something the
compiler expands similar to a macro, but syntactically a function.  So
this per se cannot be assembler since it's handled by the compiler.

Do you want to write a function in an assembler file, and call it from
C?  Of course, that's possible.

> 2) Is it possible to link user defined (my) interrupt prologue and
> epilogue functions instead of the integrated ones ?

You can declare the function as __attribute__((naked)) which will make
the compiler emit no prologue and epilogue at all.  Then plug in your
own {pro,epi}logue, supposedly using some inline asm magic.
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

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