[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 6502 Multitasking OS announce
"Bruce R. McFarling" <ecbm@cc.newcastle.edu.au> wrote:
> Disadavantage: in addition to the registers, the location
>providing the stack address would have to be saved and restored in a task
>switch. The accessing is 3 to 5 clocks slower than PHA PLA, depending on
>whether a page address boundary is crossed. And the ability to
>independently point at two stack entries is lost.
Another one I think you forgot to mention is just how hard it would be
to make and return from function calls.
You also seem to lose a register & considering you only have three I
don't think it's that workable for use in a multitasking OS.
The MMU and switching out the zero page and stack would seem to be the
cleanest and best solution. It also makes the context switch VERY
easy. In the interrupt handler all you do is the normal style of 6502
interrupt code pushing all registers on the stack. swap the pages in
the mmu, pop all the registers back ( standard 6502 int exit ) and do
a iret - job done.
-Ralph