Quote:
I have some code where the logic really benefits from the 16-bit accumulator.
Okay, what about X and Y -- is it reasonable to keep
those in 8-bit mode? They'd be fine for simple reads and writes to the 8-bit peripheral (but of course with X and Y you can't easily do AND OR EOR etc).
The other solution involves hardware. Just redefine the IO address decoding such that every other address is unused. For example, a 6522 VIA would occupy 32 (not 16) bytes of address space. Within the 32-byte space, all the even addresses would select the VIA, and all the odd addresses would select nothing.
This allows the CPU to do a 16-bit access while only touching the VIA once. On
writes, the extra 8 bits get written to nowhere. But remember -- on
reads, the extra 8 bits will contain undefined data, so your code will need to be on guard for that.
-- Jeff
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html