Can I get m68k gcc to generate 16-bit variable references?

Eljay Love-Jensen eljay@adobe.com
Tue Sep 23 02:24:00 GMT 2003


Hi Steve,

C++ has a way to do it (via references), but you want to do it in C.

Hmm.

The usual way of doing it in C is with pointers.

struct lowmem { int foo; /* ... */ };
struct lowmem* gLowmem = (struct lowmem*)0x0400;
int count_foo(void) { return ++gLowmem->foo; }

HTH,
--Eljay




More information about the Gcc-help mailing list