Jan,
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.
Robert

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,
Robert

Robert,

> 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).


Jan







_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to