Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fourspriter: Alternate Version
#5
I see you had fun with it, like I did.

Whoever wrote it had some bad habits.

First up they seemed to believe that everything should go through the A register.

And they broke convention that HL is source and DE is destination.

So I patched it with EX DE,HL in several places - it could definitely be rewritten much cleaner without needing those swapped back and forth. It did allow me to use LDI though.

Also the use of dec (hl) and inc (hl) - you spotted one I missed. I swapped out LOTS of those! In several cases I traded JR for JP. Missed some too. Teach me to post code at 2 in the morning :-) I'm glad you found places to shave.

I'm also worried that there are two huge chunks of code that are ALMOST identical - one to copy (de) to (hl) and one to copy (hl) to (de). It probably won't be too hard to make them into one piece of code. I already removed the third copy that was identical to the original.

I completely agree that removing dead comments is worthwhile; I left a lot of them in so people could see at this stage what has been changed!

Now I've got to look at your final upgrades, Boriel. Smile (and nice work, there)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)