On 7/19/2014 12:15 AM, Gerrit Heitsch wrote: > I'm curious how that is "optimized" :-) Doesn't it also need an INY in >> there? With that added, it takes more cycles and more codespace... > > No, it takes less cycles since Y is loaded with $#10 once at the > beginning to the program before entering any loop. Then it's used as a > constant to compare against while your code always loads the contents > of $08 into the accu and then compares it against #$10. So instead of > LDA/CMP (5 cycles) you only have the CPY (3 cycles) inside the loop. Ah, I misread it as an immediate load. Not a detail person, as I said. Yes, that is better and satisfies my original goal of not using a synthetic counter. > > Not that it really makes any real difference, but if there is a spare > register I can use, I like to use it. Fair enough. Jim Message was sent through the cbm-hackers mailing listReceived on 2014-07-19 06:00:33
Archive generated by hypermail 2.2.0.