floobydust wrote:
Hope you don't mind, but I took your code and changed it a bit.... it's shorter and will execute a bit quicker. I didn't see the hexout routine used, but I shortened that a bit too.
Thank you! I'm a 6502 newbie, have just decided to use W65C02 instruction set since CRC65 at 14.7MHz will always be W65C02. In fact, just yesterday I've learned from your code example about W65C02's Indirect addressing (LDA (zp)) without the y index. Very cool. I think I'll post my code on newbie page for (hopefully constructive) criticism.
I do have my hangups...I never did like replacing:
JSR x
JSR y
RTS
with
JSR x
JMP y.
It just seems ... wrong. Another one I don't like is replacing
AND #1
BEQ z
with
ROR
BCC z.
I've used these equivalents on Z80 when I'm desperate for space or speed, but have always commented to remind myself how much I really don't like it.
Bill
Edit, Z80 has instructions for "return from subroutine based on conditional code". Very powerful instructions--once I got over the nausea!