Comment by mmphosis

Comment by mmphosis 2 days ago

2 replies

Try to keep the value 0 in the Y register.

  echo tya|asm|mondump -r|6502
                                A=AA X=00 Y=00 S=00 P=22 PC=0300  0
  0300- 98        TYA           A=00 X=00 Y=00 S=00 P=22 PC=0301  2
brucehoult 2 days ago

That's 1 byte smaller than `LDA #0`, but not faster. And you don't have enough registers to waste them -- being able to do `STZ` and the `(zp)` addressing mode without having to keep 0 in Z or Y were small but soooo convenient things in the 65C02.

  • snvzz a day ago

    You might like the PC Engine, a game console based on the 65C02*.

    *Actually a custom chip also containing some peripherals.