Re: [cc65]zero page

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-01-06 13:18:43


On Fri, Jan 05, 2001 at 11:33:50PM -0500, troy silvey wrote:
> I have been reading some of the documentation on register values
> and zero page. I was wondering how cc65 makes zero page
> usage decisions. There are many zero page addresses on the
> 64 that are not used normally if your not using basic or tape
> drives that could be a good place for short routines, strings,
> pointers...  Has any one tried to take advantage of these?

The runtime and C libraries use 24 zero page locations. 6 are used by the C
code directly, another 12 are used by the runtime and C library for pointers
and other stuff, and 6 are reserved for register variables (currently not
available but used in the library here and there).

As far as I can tell, there is no place in the libraries where code is written
in an ineffective way because zero page locations were missing. There are
routines that may be made faster by using knowledge about a special machine,
but this would make the code non portable and in all these cases the
improvements would not be based on zero page locations, but on the use of self
modifying code (assuming that the executable is loaded into RAM, not ROM),
existing ROM routines, or special machine behaviour.

Using too much zero page space would also give portability problems, since
there are platforms where zero page space is scarce (I think, GEOS is one such
platform).

Regards


	Uz


--
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:38 CET