Re: [cc65] size of .enum?

From: <silverdr1wfmh.org.pl>
Date: 2013-03-31 00:23:06
On 2013-03-30, at 18:26, Ullrich von Bassewitz wrote:
>> Situation: several variables to be placed in zeropage starting at $50.
> 
> If you want to place something somewhere, use the linker.
> 
> .segment        "MYZP" : zeropage
> var0:   .res    1
> var1:   .res    2
> var2:   .res    4
> ...
> varn:   .byte   0

Unfortunately it doesn't look so nice when I want to .exportzp this. In file "zp_variables.s" I have now something like:

.segment "ZP_VARIABLES" : zeropage

.exportzp te_counter: zeropage = *
	.res 1
.exportzp he_counter: zeropage = *
	.res 1
[...]


> Place this segment in it's own memory area starting at $50. The size is then
> the fill level of the memory area:

then the linker config:

MEMORY
	ZP_50: start = $0050, size = $0030, type = rw;

SEGMENTS
	ZP_VARIABLES:	load = ZP_50,	type = zp,	define = yes;



>        .import __MYZP_START__, __MYZP_LAST__   ; Linker defined
>        lda     #<(__MYZP_LAST__ - __MYZP_START__)


but when I do:

.import __ZP_VARIABLES_START__, __ZP_VARIABLES_LAST__ ; Linker defined
ZP_BYTES_USED = <(__ZP_VARIABLES_LAST__ - __ZP_VARIABLES_START__)

I receive:

Unresolved external `__ZP_VARIABLES_LAST__' referenced in:
  read.s(11)
Unresolved external `__ZP_VARIABLES_START__' referenced in:
  read.s(11)


-- 
SD!

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Mar 31 00:25:31 2013

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