Re: [cc65] .cpu none?

From: David Holz <davidh1otterspace.com>
Date: 2004-04-16 20:13:32
From: "Groepaz" <groepaz@gmx.net>
> ps: reminds me of some other guys code i was crawling through some
> (long) time ago....
>
> D011: lda #$00
> ... lot of code
> sta D011+1
>
> eeeeks :=P

I use this *all* the time.  If it's holding a numeric value, I call it a
"local variable". :)  I also use it for state transition flags.  Note that
having your variable in zeropage takes 3 cycles for a read, and 3 cycles for
a write.  Doing the above uses 4 cycles for a write, and 2 for a read, which
is the same speed when constantly written & read, faster when there are more
reads than writes, and uses 1 less zp byte and 1 more code byte.

A bit off-topic, but that really isn't very unconventional code. :)

-- 
White Flame (aka David Holz)
http://www.white-flame.com/

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Apr 16 19:54:58 2004

This archive was generated by hypermail 2.1.8 : 2004-04-16 19:55:04 CEST