[Top][All Lists]

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

Re: [avr-gcc-list] How to do multi-line assembler macros?

From: David Gay
Subject: Re: [avr-gcc-list] How to do multi-line assembler macros?
Date: Tue, 09 Sep 2003 11:51:54 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Joerg Wunsch wrote:
As Brian Dean <address@hidden> wrote:

There are lots of servos, so I'd like to write a macro like this:

#define RESET_SERVO(servo) \
        lds     r##servo, servo_##servo ;\

IIRC, the $ sign is used as a logical line terminator.

Yep.  How's that proverb?  ``All documentation files usually end up in
.c.''  This is from gas/config/tc-avr:

const char comment_chars[] = ";";
const char line_comment_chars[] = "#";
const char line_separator_chars[] = "$";

While we're on this: why did avr-as choose to use $ as a line separator, and ; for comments? Most versions of GNU as uses ; as the line separator... Also, gcc allows $ in identifiers, which leads to exciting assembler output when you do that with avr-gcc ;-)

David Gay

reply via email to

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