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

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

Re: [avr-gcc-list] searching for avr-gcc assembler reference


From: J Wunsch
Subject: Re: [avr-gcc-list] searching for avr-gcc assembler reference
Date: Thu Jan 18 01:58:04 2001

Denis Chertykov <address@hidden> wrote:

> You wrong.
> gas have a macros.
> 
> Also you can try to use `gasp' - Gnu Assembler Macro Preprocessor.

Well, but they are not built into gas...  I only looked up the `info'
pages for gas.

I think most people who need to write some code portions directly in
assembler for gas use cpp anyway (like in OS projects, as in Linux or
the *BSDs).  That provides a different macro option without being
built into gas itself.  (avr-)gcc can handle this iff the file is
ending in .S (a capital S, not a lowercase one).  For example, if the
following is stored in foo.S:

#define FUNC(name) .section .text; .type name,@function; name:

FUNC(foo)
        ldi     r23, 15
        ret

running "avr-gcc -mmcu=at80XXXX -c foo.S" would work and produce the
appropriate foo.o file.

Yet another option would be m4, but i'm not aware of any tools that
support this combination smoothely, so you have to pipe them manually,
like in

        m4 foobar.asm | avr-gas -o foobar.o

-- 
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]