This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: using #defines with asm
- From: John Love-Jensen <eljay at adobe dot com>
- To: Phildale <Pdale at activer dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Fri, 26 May 2006 07:39:51 -0500
- Subject: Re: using #defines with asm
#define STRING(x) #x
#define LONG_ASM(x) asm(".long " STRING(x))
#define VALUE 0xABCDABCD
LONG_ASM(VALUE)
On 5/26/06 7:36 AM, "Phildale" <Pdale@activer.com> wrote:
>
> this works
>
> asm(".long 0xABCDABCD");
>
> but i want to use #defines
> eg
>
> #define VALUE
>
> asm(".long VALUE");
> that will obviosly not work, does anyone know how to get it to work?
> --
> View this message in context:
> http://www.nabble.com/using+-defines+with+asm-t1686557.html#a4575436
> Sent from the gcc - Help forum at Nabble.com.
>