[cc65] Zeropage and cc65

From: Carlos <shangri-la1teleline.es>
Date: 2010-08-03 14:17:58

Emphasize that i'm not an experienced c64 programmer and have doubts about some facts of the ZP and cc65 (that are probably newbie stuff).

I know what ZP is, first of all don't understand why in the cc65 default configuration file for c64 the ZP is defined as: 
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;

Another issue is about the .IMPORTZP command. All cc65 automatic generated .s files includes the sentence: .importzp sp, sreg, regsave, regbank, tmp1, ptr1, ptr2. I suppose that these symbols are bytes residing in the ZP area and can be used as 'fast access' variables in the asm modules.

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?

Have each symbol a special function according to its name? Can i change symbol names and/or add new ZP symbols?

To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Aug 3 14:18:29 2010

This archive was generated by hypermail 2.1.8 : 2010-08-03 14:18:33 CEST