5 ms·
It's not segmented, it's banked. And due to instructions that can use far pointers, you can directly access the entire memory. The main annoying part for me is
by 0xTJ 6y ago
It's not segmented, it's banked. And due to instructions that can use far pointers, you can directly access the entire memory. The main annoying part for me is that the stack and zero page are stuck within the first bank, limiting usability for a multitasking system.
- moring 6y agoCan't you still have 128 tasks even without sharing pages between tasks? That is, one direct page and one stack page for each task, with 256 pages total in bank 0. With sharing I mean, when you have two or more tasks of which only one instance will run, they can use the same direct page. Similar if you can statically limit the stack size of the tasks to a fraction of 256 bytes, you can fit multiple stacks on the same page with some work.
- cmrdporcupine 6y agoSaid far pointers are only for certain instructions, and there's no register which can hold a full 24-bit address, so there's always a bunch of hassle when dealing with addresses. They should have added a "pointer" register, which could hold both a 16 bit value and a bank value. Program counter is 16 bit, with a separate bank byte; it'll wrap when it hits the bank boundary. Constantly having to flip between register modes is a hassle. And makes it very difficult to write compilers and high level languages. Many common patterns require flipping back and forth a few times. Either they needed to have a whole new set of addressing modes, or they should have just added 3 new registers -- 16 bit versions of X Y and A -- and let the two co-exist. Honestly, this is an era when a 68000 could be had with a full 16 register set of 32-bit registers. The 65816 doesn't look so hot in that light, though it certainly was faster at interrupt handling. I guess Nintendo made do with their modified 816, but it really is not a nice architecture.