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

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

Re: [avr-gcc-list] global vars


From: Christoph Plattner
Subject: Re: [avr-gcc-list] global vars
Date: Wed, 17 Oct 2001 10:52:54 +0200

Not fully correct !!!

Type "int" has only 16bits !!! NOT 32 !!!

Bye
        Christoph P.



Dmitry wrote:
> 
> try
> 
> int tmp
> 
> asm volatile (
>         "lds r24 tmp \n\t"
>         "lds r25 (tmp)+1 \n\t"
>         "lds r26 (tmp)+2 \n\t"
>         "lds r27 (tmp)+3 \n\t"
>         ...
>         "sts tmp, ...
>         "sts (tmp)+1, ...
> );
> 
> at least it works in my case
> 
> On Mon, 15 Oct 2001 16:24:10 +0200
> Torsten Hahn <address@hidden> wrote:
> 
> > Hi,
> >
> > if i have have defined some global vars, can i access them in an inline
> > assembler block ? I want do something like this:
> >
> > int tmp;
> >
> > int main(void)
> > {
> > ....
> > _asm_("read/write/modify tmp here");
> > ...
> > }
> >
> > CU,
> > Torsten.
> > --
> > Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg / Germany
> > mail: address@hidden
> > phone: (+49) 177 2181338
> > pgp key avaiable at: http://math-www.uni-paderborn.de/pgpnet/wwwkeys.html
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > address@hidden
> > http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> >
> 
> *********************************************************************
>    ("`-''-/").___..--''"`-._     (\       Dimmy the Wild      UA1ACZ
>     `6_ 6  )   `-.  (     ).`-.__.`)      Enterprise Information Sys
>     (_Y_.)'  ._   )  `._ `. ``-..-'       Nevsky prospekt,   20 / 44
>   _..`--'_..-_/  /--'_.' ,'               Saint Petersburg,   Russia
>  (il),-''  (li),'  ((!.-'                 +7 (812) 314-8860, 5585314
> *********************************************************************
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

-- 
  +--------V--------+   address@hidden
  |  A L C A T E L  |   -----------------------------
  +-----------------+   Phone: +43 1 27722 3706 
         T A S          Fax:   +43 1 27722 3955



reply via email to

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