[cc65] Global register variables

Date view Thread view Subject view

From: Benjamin Bahnsen (bb_at_game64.de)
Date: 2004-01-22 17:22:02


I've been working a few month with the cc65-compiler now and i must say
again - it's great. Thanks a lot for this powerful compiler!
Here's my problem:
I sometimes use global variables for loops and math stuff, because they seem
to be faster than local variables. But i am not able to declare them as
register variables to gain even more speed. The register-command does only
seem to work within functions.
I tried to declare a pointer to a zeropage adress, like

unsigned char *c = (unsigned char*)0xFF;

but if i want to write something into c, with "*c = 100", the compiler
doesn't recognize, that c points to the zeropage and uses the same code as
for a "normal" address.

Is there a way to globally declare variables, so that are located at the
zero page?

Benjamin



----------------------------------------------------------------------
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 : 2004-01-22 17:24:14 CET