[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6502 Multitasking OS announce



jponge@mtu.edu (Joshua P. Onge) wrote:


>: All well & good BUT the 6502 does not have a relocatable stack pointer
>: so your kinda left with a bit of a problem when it commes to
>: multitasking, ie you cant give each process it's own stack without
>: copying the whole stack ( maybe just to the current sp value? )during
>: each context switch. 

>I believe that, from reading Andre's webpage on his OS, the operating
>system saves registers, to keep each program in it's own little world. You
>should read his description, it's quite ineresting.

There is much more needed that to simply save the registers! He
doesn't explain what he is doing, the only way I can see that he is
doing it is using his mmu to swap the bottom 4kb during each context
switch.  This would give each process it's own stack and zeropage
space.  You can then pass parameters on the stack or in the zeropage -
it's up to you.  I would lean toward the stack though because you
could not have rentrant routines or share code between processes.