This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Can I get m68k gcc to generate 16-bit variable references?
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: steven at horizon dot com, gcc-help at gcc dot gnu dot org
- Date: Mon, 22 Sep 2003 21:23:35 -0500
- Subject: Re: Can I get m68k gcc to generate 16-bit variable references?
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