I know you just copied JoeDavisson's routines, but here are just a few pointers anyway:
Quote:
(ps i just want to run it in 8 bit mode, 65c02 mode that is..
Note that running with 8-bit registers is separate from '02 emulation mode. You can still have 8-bit registers in '816 native mode.
SEI (set interrupt disable bit) and CLD (clear decimal-mode bit) are part of the reset sequence and the interrupt sequence; so there's no need to do them in the reset routine unless you might branch to it from a running program. Also, the '816 comes out of reset in '02-emulation mode; so if that's what you want, there's no need to explicitly tell it.
Rather than LDA #0, STA___, you can just use the STZ (store zero) instruction which is faster, takes less memory, and leaves the accumulator and status register alone.
If you know a register or memory location is 0 and you want to make it $FF (or $FFFF if A is 16-bit), you can just do DEC___ instead of LDA #$FF, STA___. If you use a memory location as a flag and want to set it and all that matters is whether it's 0 or not (and you branch on the Z flag), or you only look at the high bit (and then branch on the N flag), you can also just do DEC as long as you can know you're not decrementing so many time that the value again becomes 0 (in the first case) or positive (in the second case).
Your JMP GO could be replaced with BRA GO for a one-byte savings. The execution time is the same.
JSR's to a one-instruction subroutine can be replaced with a macro that just inlines that one instruction (like STZ $DF23) and then the descriptive macro name accomplishes the purpose of being clear about what you're doing, and the JSR/RTS overhead is eliminated.
Almost none of the 6502 primer is specifically about the '816, but you should find its programming tips page helpful anyway, at
http://wilsonminesco.com/6502primer/PgmTips.html .