BDD wrote:
WDC ran a simulation of an abort occurring during the opcode fetch cycle of STP and WAI and determined that both instructions will ignore ABORTB and halt the MPU.
Wow, really? Doesn't that constitute a bug?! ABORTB should allow you to implement virtual memory -- to create the illusion of having 16 MB of RAM when in fact there's less. IOW you alias the existing RAM, and rely on aborts generated by your mapping hardware. When a program makes reference to something not currently resident in RAM, an abort intervenes to access mass storage and
make it resident. Usually that means overwriting some existing RAM contents from earlier. But the program should never "see" the stale content if virtual memory is working properly.
There'd be no problem making reference to
data which is non-resident. But if the reference is a
code fetch (for instance you've just made a JML or JSL) and the first byte of yet-to-be-updated RAM you touch happens to contain $DB or $CB then you're sunk! Although ABORTB will be asserted the CPU won't obey. Instead, a STP or WAI will erroneously be executed. Am I missing something? This makes me wonder whether virtual memory for '816 has ever been realized in practice, or is just a theoretical potential.
One workaround would be to ensure that code accesses to non-resident addresses not only trigger an abort but also force a known value (such as $EA) onto the data bus. The non-response of STP & WAI to ABORTB should be noted in the Caveats of Section 7.4 !!
cheers,
Jeff
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html