share constants between C and assembly ?
Wed Jan 5 10:27:00 GMT 2000
I'm going through my include files one more time to make sure they are
My assembly language files mention
while my C language files mention
As I compare these files to make sure that whenever I change
PWM0 EQU 0xFFFF1000
in hardware_h.s, I remember to change
#define PWM0 0xFFFF1000
in hardware.h to match.
I keep thinking "There must be a Better Way". Couldn't I somehow
define these things in one place that can be accessed by both
C and assembly code ?
I already pass the locations of variables and functions that I share
between C and asm with
extern void fast_fft( float * time, float * frequency );
extern int atm_buffer;
extern const char version_string = "SpiffyProg " __DATE__ __TIME__;
It would be really cool if I could just reference C language definitions
in my assembly language file, or alternatively, reference assembly-
in my C language file.
Then everything would be defined in one place, self-consistent with
itself, and I would save a lot of time manually consistency checking
(and getting weird errors when I miss an inconsistency).
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Gcc-help