Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: *ARGH*

Re: *ARGH*

2008-02-28 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, Tom <tjkeller1@...> wrote:
> How do I access said vars from assembly language in
> the same program image?

If you're referring to inline assembly language, the recipe you're 
seeking is in the Inline Assembler Cookbook:
http://www.nongnu.org/avr-libc/user-manual/inline_asm.html

Alternately, if you're asking how to reference a variable from a pure 
assembly language file (a .S file), just refer to the variable name 
and, assuming it's public, the linker will resolve it.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

*ARGH*

2008-02-28 by Tom

OK.  Again, I am using avrgcc.


   I place some values in some vars declared as unit8_t.   How do I 
access said vars from assembly language in the same program image?

avrFreak

Re: [AVR-Chat] Re: *ARGH*

2008-02-28 by Tom

Don Kinzer wrote:
>
> --- In AVR-Chat@yahoogroup s.com <mailto:AVR-Chat%40yahoogroups.com>, 
> Tom <tjkeller1@. ..> wrote:
> > How do I access said vars from assembly language in
> > the same program image?
>
> If you're referring to inline assembly language, the recipe you're
> seeking is in the Inline Assembler Cookbook:
> http://www.nongnu. org/avr-libc/ user-manual/ inline_asm. html 
> <http://www.nongnu.org/avr-libc/user-manual/inline_asm.html>
>

    Don,  call me stupid, but I can't get that to work)-:.

    I have several vars  ceclared as uint8_t in C.   I store some values 
in them, then do some inline ASM.
I need to access the valeus stored therein.  I have tried everything I 
can find, and everything results is
some form of error message from the compiler.   I KNOW this is doable, 
but *I* have never done it

avrFreak

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.