Re:Emulating a 6502 with cycle-perfect timing
by melling on Thursday May 29, 2014 @12:10PM
(#7816924)
My 6502 is a little rusty but wasn't it always faster to decrement the index? Don't compare to 10 each time, just decrement to zero. You save one instruction, which was probably a few clock cycles.
[ Parent
| on HN ]
Re:Emulating a 6502 with cycle-perfect timing
by Macsenour on Thursday May 29, 2014 @02:21PM
(#7817738)
Yes, and never forget the BMI opcode.
Re:Emulating a 6502 with cycle-perfect timing
by mattgodbolt on Thursday May 29, 2014 @06:50PM
(#7819121)
Absolutely yes: I was just showing an example, not the most optimal code :)