View Single Post
Old 22 June 2012, 09:56   #22
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by Photon View Post
If you need to replace the movep you've saved 1 cycle per digit, if you add to the score maximum once per frame. If the player should kill 2 baddies in one frame, the BCD method takes longer.
Hm. As I'm not drawing the scores every frame, but only when changed, my advantage is probably not as high as I thought. Also my example code was wrong. When I wrote it from memory I swapped the nibbles during conversion. In reality I cannot use (a0)+, but need d16(a0), which costs some more cycles.

Quote:
The table takes 200 bytes
You're right. I had multiplied it by 2, although it is always the same table for both references.

Quote:
Here's a non-div, non-table, non-BCD alternative:
Doesn't seem to be much better.

Quote:
I was really only interested in showing BCD gives no real gain
Admitted the gain is small. But I still see a minor advantage using it, which is reason enough for me.
phx is offline  
 
Page generated in 0.07937 seconds with 11 queries