RE: [stella] Loops with two counters

Subject: RE: [stella] Loops with two counters
From: "Bob Montgomery" <BobM@xxxxxxxxxxx>
Date: Thu, 7 Jul 2005 15:49:44 -0400
Hi Manuel,

According to the information I have the only addressing modes for cpx and cpy are immediate, zero page, and absolute - no indexed addressing.  Is that incorrect?

Thanks,

-bob

-----Original Message-----
From: Manuel Rotschkar [mailto:cybergoth@xxxxxxxx]
Sent: Thursday, July 07, 2005 12:47 PM
To: stella@xxxxxxxxxxxxxxxxxx
Subject: Re: [stella] Loops with two counters


Hi Bob!

> So, the looping code looks something like this:
>
>   dey                 ;+2   50
>
>   tya                 ;+2   52
>   cmp BlockChange,X   ;+4   56
>   bne Kernel1Loopa    ;+2   58
>   dex                 ;+2   60
>   bpl Kernel1Loopb    ;+3   63
>
> That takes 15 cycles. Is there a faster way?  I really need a few more 
> cycles :)

Hard to tell from the snippet. If you'd swap x and y, you could do
cpx BlockChange,y
saving you the 2 cycles for the TYA...

Greetings,
Manuel
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://stella.biglist.com
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://stella.biglist.com

Current Thread