nyef wrote:
If you're willing to presume that all "program" code resides in one 64k bank, and data defaults to that same bank, then you only need to look to a bank override to cover a range of cycles from some point in the "future", call it 2-4 cycles ahead of your prefix instruction, until the next SYNC (opcode fetch). That sounds very doable in terms of the one-cycle "boring" NOPs on a 'C02. The per-instruction cycle details then get covered by suitable assembler macros.
nyef wrote:
I'm also reminded of reading about the software interface of an early version of the macintosh
White Flame wrote:
pointers can simply be 24-bit (with "wasted" bits in the middle byte)
The main advantage IMO is in facilitating pointer arithmetic. Eg: when stepping through an array of items each $1000 in size, linear addresses let us find the address of the next or previous item simply by adding or subtracting $1000 to the address of the current item. Although something similar is possible with the other scheme (wasted bits in the middle), every arithmetic operation needs to be followed with a check and possible adjustment for overflow/underflow into the unused bits. People's tastes & priorities vary, but to me it's undesirable to always be guarding against bugs from that source. If the hardware of the expansion scheme allows linear addressing, then an address can be passed from one function to another with no burden on either end.
I concede the example of a linked list was poor choice. We won't likely be doing pointer arithmetic on those links
-- Jeff