use alias for variable:

long var1;
long var2 asm("var1");

Actually it doe not matter if var1 and var2 will have different sizes.


For example the following

char buffer[1000];
struct {complex a1,a2,a3;} a1 asm("buffer");

will work as well.

~d
P.S. if you're using variables within some 'area' declare them as local :)


On Saturday 15 February 2003 12:26, Oleg Skydan wrote:
> Hi, All,
> I want to define some sections so that them occupy the same memory
> locations.
>
> How I can do it ?
>
> I tried to use --section-start ld option, but it seems it does not work :(
> !?
>
> The idea is to put variables that have no simultaneous use in the
> overlapping
> section, and save some memory :).
>
> Thanks,
> Oleg.
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

-- 
*********************************************************************
   ("`-''-/").___..--''"`-._     (\       Dimmy the Wild      UA1ACZ
    `6_ 6  )   `-.  (     ).`-.__.`)      Enterprise Information Sys 
    (_Y_.)'  ._   )  `._ `. ``-..-'       Nevsky prospekt,   20 / 44
  _..`--'_..-_/  /--'_.' ,'               Saint Petersburg,   Russia
 (il),-''  (li),'  ((!.-'                 +7 (812) 314-8860, 5585314
*********************************************************************




Reply via email to