top | item 46112719

(no title)

mmphosis | 3 months ago

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

discuss

order

brucehoult|3 months 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|3 months ago

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

*Actually a custom chip also containing some peripherals.