At 11:15 AM 5/6/2006 +0000, MB wrote:
>I'm trying to use C variables inside inline assembly code, but can't
>get it to work (the compiler is gcc).
>
>static const short g_psMyArray asm("g_psAsmMyArray:") =
>{ 1, 2, 3, 4};
>
>void myfunc()
>{
> asm("ADRL r14, psAsmMyArray");
>}
>
>This results with an error (something like "symbol is undefined in
>current file").
Why not just use C? What's the advantage you are expecting that's
compelling you to use assembly?
If you can provide a little more detail maybe we can solve the problem in
another way.
Robert
" 'Freedom' has no meaning of itself. There are always restrictions, be
they legal, genetic, or physical. If you don't believe me, try to chew a
radio signal. " -- Kelvin Throop, III
http://www.aeolusdevelopment.com/Message
Re: [lpc2000] Inline assembly and C variables
2006-05-07 by Robert Adsett
Attachments
- No local attachments were found for this message.