barrym95838 wrote:
Another would be to steal $0000 -> $007f for I/O, allowing for faster and shorter access. Of course, you're left with only 128 bytes of ZP RAM, but that ought to be enough for anybody!!
OK, you're joking, Mike -- and the jest
is amusing in the context of legacy systems whose Z-pg is stuffed full of a hodge podge of "essential" items. But let's remember the situation can be drastically different when you're creating your own system from scratch. For example, one of my systems
easily affords a generous, 64 byte I/O space in Z-pg. This makes the I/O code smaller and -- more importantly --
faster. See my thread
major speedup with 65C02 I/O mapped into zero-page.
In
this section of his
Stacks Treatise, Garth explains how a coordinated strategy can magically relieve crowding in Z-page.
Quote:
why would you want to devote some of that precious space to a data stack when it's already in short supply? As it turns out, it's a pretty good investment. It's like variables that only exist when they're needed, and afterwards, the space is released for something else to use it.
Quote:
If you need a variable long-term, fine—leave it as a variable. Other variables however may be needed only intermittently, and their contents will be irrelevant between uses.
And... just thinking out loud...
Since the topic is fine-grained decoding, here's an aspect incidental to the matter Chromatix mentioned (above).
With fine-grained decoding, some or all of the three vectors in Page $FF could activate the same physical page of RAM which also hosts the ZP area. What this buys you is the ability to remap the individual ISRs more quickly. (Only in very specific circumstances will this matter. But I believe in stirring the pot and exploring ideas.)
Here's an example. Maybe a timer interrupt needs to get redirected so that (say) four different routines will be serviced, each being serviced once per four interrupt intervals. So, the CPU fetches the vector using the address in page $FF, of course. But the code which then updates the vector would address those same bytes according to their Z-pg aliases, shaving cycles off of the performance-sensitive ISR.
-- Jeff
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html