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

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

Re: [avr-gcc-list] WinAVR inline assembler


From: E. Weddington
Subject: Re: [avr-gcc-list] WinAVR inline assembler
Date: Thu, 17 Mar 2005 10:05:02 -0700
User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)

Jens Andersen wrote:

Hi list,

Ive just by accident discovered that avr-gcc in
the latest WinAVR disti supports inline assembler
in the form:

asm("ldi r16, 0x80");
asm("sts 0x61, r16"); // CLKPR

This is mutch closer to the Atmel syntax than
the gnu assembler syntax.

However if i try to use symbolic names from
the header target specific header file (mega48)
i get a undefined symbol error.

Can someone explain a little more about this feature ?
Is this a macro whitch expands to gnu syntax ?

Inline assembly in GCC is kind of a strange beast. Take a look at the avr-libc user manual. There's a section in there that discusses how to write inline assembly in GCC. You can also look at the GCC user manual too.

Eric




reply via email to

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