[cc65] pre processor #define and assembler constants

From: Mats Andrén <matan3251student.liu.se>
Date: 2004-09-28 01:09:08
A quick question. Is there a proper way to share asm-constants and
c-preprocessor-defines between asm and c files?

So I won't have to place the same constant values in two different
sourcefiles, like:

        MYCONSTANT = 99

...and...
        
#define MYCONSTANT 99

?

I don't want to use "_MYCONSTANT = 99" and "const char KONSTANTIN =
99;" since that would slow down some time critical assembler code in
my program. The whole issue is not that important, but it's always
nice to do things in a proper way. I thought of doing some asm-macro
called "#define" so I could do an include file that would work for
both asm and c, but "#define" wasn't allowed as a name of a macro
(understandable).

Just a thought.

/Mats

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Sep 28 01:07:55 2004

This archive was generated by hypermail 2.1.8 : 2004-09-28 01:08:04 CEST