Re: [cc65] Temporary zero-page allocation

From: Ullrich von Bassewitz <>
Date: 2013-10-27 20:50:30
On Sun, Oct 27, 2013 at 08:28:43PM +0100, doynax wrote:
>    I think I may have confused the issue somewhat by speaking of registers.
>    I'm mostly concerned with zero-page allocation in assembly code, not C.

Sorry, then I got that wrong. But in assembly, it's even more difficult,
because it's almost impossible to generate call graphs. How could the
assembler know where a function starts and ends? There are tricks like "pla;
pla; rts" to drop a return address and jump back to the caller of the calling
function. Or think about functions that are called using vector tables with
high and low byte split. Or several entry and exit points within some block of

>    On a related subject.. I haven't dug around much in the code yet but do
>    you think it would be difficult for me to add more code generations
>    patterns for zero-page accesses?
It's difficult for me to judge how difficult that is for you:-) Changing code
generation or adding pattern replacements to the optimizer is definitely
nothing you can do in an afternoon without ever having looked at the code
before. Provided that you aren't an absolute coding genius of course.



Ullrich von Bassewitz                        
Encrypted email preferred                          PGP Key-Id: 29D93B10
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Oct 27 20:50:38 2013

This archive was generated by hypermail 2.1.8 : 2013-10-27 20:50:40 CET