Re: [cc65] .cpu none?

From: Groepaz <groepaz1gmx.net>
Date: 2004-04-17 00:29:18
On Friday 16 April 2004 20:13, David Holz wrote:
> 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. :)

err yes, the point was that he named the label "D011" which
can be (and was :=P) quite confusing :)

gpz

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Apr 17 00:18:59 2004

This archive was generated by hypermail 2.1.8 : 2004-04-17 00:19:05 CEST