Re: [cc65] size of .enum?

From: Ullrich von Bassewitz <>
Date: 2013-04-02 10:32:15
On Sun, Mar 31, 2013 at 08:15:59PM +0200, wrote:
> > This is a circular reference. __ZP_VARIABLES_LAST__ is the space used in the
> > memory area, which depends on the number of bytes reserved.
> There is no circularity because I try to reserve the space in /another/
> memory area for the storage of original content of the ZP locations.


> > Anyway, .res needs a constant, because the linker cannot change what is in an
> > object file. Or in other words, the assembler cannot allocate a currently
> > unknown number of bytes somewhere.
> I understand. What do you believe to be the best approach in such situation,
> except manual counting of all the defined variables every time?

There is no other solution than to define a constant somewhere, so yes,
manual counting is required. To make sure nothing goes wrong, I would place
the constant into an include file and check it via .assert in the module that
has the actual variables.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Apr 2 10:32:22 2013

This archive was generated by hypermail 2.1.8 : 2013-06-15 17:37:38 CEST