Re: [cc65] segment/memory defines

From: Ullrich von Bassewitz <>
Date: 2004-06-19 14:21:29
On Fri, Jun 18, 2004 at 11:03:04AM -0700, Shawn Jefferson wrote:
> Can you use these from a C program?  I looked in the
> docs and also tried it to no avail.
> I want to printf("%d", __BSS_LOAD__) or similiar.

I haven't tried it, but it should be possible. Make sure, the linker config
contains a "define = yes" statement, and then use the following:

        extern char _BSS_LOAD__;        /* Starts with one(!) underline */
        printf ("__BSS_LOAD__ = $%04X\n", (unsigned) &_BSS_LOAD__);



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Jun 19 14:21:33 2004

This archive was generated by hypermail 2.1.8 : 2004-06-19 14:21:41 CEST