Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Inline assembly and C variables

2006-05-06 by MB

Hi,

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").

Anyone knows how to do this kind of thing ?

Thanks in advance,
MB

Attachments

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.