Re: [cc65] How to force a pointer optimization?

From: Ullrich von Bassewitz <>
Date: 2009-04-14 21:54:36
On Tue, Apr 14, 2009 at 07:27:50PM +0200, Jakub wrote:
> However when I use a constant pointer, the generated code is much less
> efficient, even with zero-page indexer.
> Is there a way to write constant+index ((unsigned char*)a)[i] somehow to
> make it optimized by CC65?

        memset ((unsigned char*) 0x1234, 0, 200);

translates to

        ldy     #$00
L0008:  sta     $1234,y
        cpy     #$C8
        bne     L0008

Apart from that, there is no way to change the generated code (at least not
one, I know).



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Apr 14 21:57:23 2009

This archive was generated by hypermail 2.1.8 : 2009-04-14 21:57:25 CEST