[Top][All Lists]

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

[Fwd: Re: [Fwd: Re: [Fwd: Re: [avr-gcc-list] in-line assembler]]]

From: Robert von Knobloch
Subject: [Fwd: Re: [Fwd: Re: [Fwd: Re: [avr-gcc-list] in-line assembler]]]
Date: Wed, 12 Aug 2009 09:43:47 +0200
User-agent: Thunderbird (X11/20060911)

as I replied to Wouter, I had somehow got the wrong meaning of sts fixed
in my head. Talking (mailing) to you people has unlocked the brain.
Many thanks for the help.

David Brown,
yes, I used this as an exercise to understand the in-line assembler stuff.
The actual function is not as important as the understanding why.
Thanks for your input,


> I didn't understand the compiler/assembler interaction

It's not trivial, indeed; on the other hand, it is unusually powerful.

> I can't get an "sts var, Y" to work
 There is no such sts instruction. Take a look at the list of instruction at 
the end of every AVR datashet. 

You shouldn't look at Y as a register - rather, it is part of the instruction 
mnemonics. The AVR syntax is a bit confusing at this: many assemblers chose a 
more explucit (albeit more "verbose") syntax when it comes to "indirection" 
(e.g. @Rn in '51 or (HL) in Z80 or [xxx] in 6502 and '196 and others).


reply via email to

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