* using #defines with asm
@ 2006-05-26 12:36 Phildale
2006-05-26 12:40 ` John Love-Jensen
0 siblings, 1 reply; 3+ messages in thread
From: Phildale @ 2006-05-26 12:36 UTC (permalink / raw)
To: gcc-help
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: using #defines with asm
2006-05-26 12:36 using #defines with asm Phildale
@ 2006-05-26 12:40 ` John Love-Jensen
2006-05-26 12:48 ` Phildale
0 siblings, 1 reply; 3+ messages in thread
From: John Love-Jensen @ 2006-05-26 12:40 UTC (permalink / raw)
To: Phildale, MSX to GCC
#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.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: using #defines with asm
2006-05-26 12:40 ` John Love-Jensen
@ 2006-05-26 12:48 ` Phildale
0 siblings, 0 replies; 3+ messages in thread
From: Phildale @ 2006-05-26 12:48 UTC (permalink / raw)
To: gcc-help
Thank you
--
View this message in context: http://www.nabble.com/using+-defines+with+asm-t1686557.html#a4575590
Sent from the gcc - Help forum at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-26 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-26 12:36 using #defines with asm Phildale
2006-05-26 12:40 ` John Love-Jensen
2006-05-26 12:48 ` Phildale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).