Re: [cc65] Problems with Atari zeropage variables

From: Greg King <>
Date: 2005-07-22 21:26:28
From: Fatih AygŁn; on Date: July 22, 2005, at 06:45 AM -0400
> While working on Atari TGI drivers, I noticed that the
> addresses of the runtime zeropage variables in the
> module don't match with the addresses in the main program.
> There is a 6-byte "shift".
> It seems that the cause is the file "read.s". In that
> file, some zeropage variables are defined. I think that
> they should be linked AFTER the runtime zeropage
> variables, otherwise the zeropage mapping logic with
> the modules won't work. Or, maybe they can be mapped
> to standard runtime variables.

Several of the platforms have that problem.  They solve it by putting their
extra zero-page variables into another segment called "EXTZP".

I think that it's backwards!  I think that the compiler's pseudo-registers
should be the objects that are put into a specially named segment
(.segment "CC65ZP":zp).  Then, .zeropage can be used for whatever other
zero-page variables a programmer wants to put into a library or program --
".zeropage" is easier for us to remember than the spelling of some special
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Jul 22 21:26:40 2005

This archive was generated by hypermail 2.1.8 : 2005-07-22 21:26:43 CEST