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

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

Re: [avr-gcc-list] Link Eorror in Combining C and assembly source files


From: Dean Ferreyra
Subject: Re: [avr-gcc-list] Link Eorror in Combining C and assembly source files
Date: Fri, 05 Sep 2008 08:35:48 -0700
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

Shilin Yu wrote:
> Hi Dean, I have another question :

You should probably keep it on the list...

> if the C variable is of  a struct type like
>        struct context{
>                unsigned char sph_save;
>                unsigned char spl_save;
>        }
> 
>        volatile struct context thread0_context;
> 
> 
> how should I access the thread0_context.sph_save  and spl_save ?

I don't write much in assembly, but a cheat I've used in the past is
to let the compiler be my guide.  I write the equivalent of what I
want in C and compile it with the -S and look at the resulting .s file
for ideas.

Good luck!

Dean




reply via email to

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