Re: [cc65] Zeropage and cc65

From: Oliver Schmidt <>
Date: 2010-08-03 14:41:54
Hi Carlos,

> ZP:  start = $0002, size = $001A, type = rw, define = yes;
> The ZP, if i'm not wrong, seizes the first 256 bytes (minus the two
> hardwired very first addresses) of the memory map so this memory area should
> be defined as: ZP:  start = $0002, size = $00FE, type = rw, define = yes;

Following your argumentation it should be defined as below, shouldn't it?

ZP:  start = $0000, size = $0100, type = rw, define = yes;

So you see there's something different about it. If you look at the
RAM definition it becomes even more evident that the memory areas
define what you want the linker to use - which must by no means be
identical to what is present in your machine.

> sp, sreg, regsave, regbank, tmp1, ptr1, ptr2.
> Can these symbols be freely used in any own asm module? (for instance to
> store temp values, ...) and are completely 'safe' for use for my own
> purposes without risking a crash?

No. As far as I know there's very little documentation about them so
after all I'd conclude that assembly language programmers making use
of those variables are supposed to have some intimate knowledge of
their meaning/usage and the policies of saving/restoring.

> Can i change
> symbol names and/or add new ZP symbols?

You can add new ZP symbols as you like - provided you increase the ZP
memory area dicussed above to hold them - or create a second "private"
zeropage memory area.

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Aug 3 14:41:58 2010

This archive was generated by hypermail 2.1.8 : 2010-08-03 14:42:00 CEST