Re: [cc65] size of .enum?

From: <>
Date: 2013-03-31 20:15:59
On 2013-03-31, at 18:53, Ullrich von Bassewitz wrote:

> On Sun, Mar 31, 2013 at 05:15:33PM +0200, wrote:
>> can I somehow use the information from
>> to reserve the exact amount of ZP backup storage bytes?
>> 	.res ZP_BYTES_USED
>> wants a constant expression..
> 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. But I don't want to waste space unnecessarily by making it bigger than needed or get into strange behaviour when I add some variables and run out of reserved 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?


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Mar 31 20:16:12 2013

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