Re: [cc65] indirect load question...

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2009-03-03 21:28:46
Hello,

* On Tue, Mar 03, 2009 at 09:19:46PM +0100 I wrote:
 
> The const prevents accidentially setting mouse_port to something
> different without a little bit more effort. It might also produce some
> more efficient code (although, I did not test it for cc65).

It does not affect the generated code at all. cc65 literally uses it as
is.

However, "a = * ((unsigned char * const) 0x0284); " is much more
efficient (compiled with -O):

000003r 1  AD 84 02             lda     $0284
000006r 1  A0 00                ldy     #$00
000008r 1  91 rr                sta     (sp),y

That's good.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/
----------------------------------------------------------------------
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 Mar 3 21:29:06 2009

This archive was generated by hypermail 2.1.8 : 2009-03-03 21:29:08 CET