[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 6502 Multitasking OS announce
holger@deep.hb.provi.de (Holger Bruns) wrote:
>I guess, it will not work. The tasks cannot be executed independently. Only
>the task on top of the stack will work without causing errors. Assume the
>parameters of task 1 have been pushed to the top of the stack. The parameters
>of task 2 are below of them. Now you try to execute task 2. Your stack
>register will point to the bottom of the parameters of task 1. Pushing any
>data to the stack will overwrite the parameters of task 1. Assume your
>system decides to execute task 1 after executing task 2. Since the parameters
>of task 1 are corrupted in this case, the system will crash.
This method will work just fine, it just gives small stacks by
dividing the large ( can you call 256 bytes large? ) stack into
smaller stacks. Now providing all tasks play by the rules and do not
use more than their stack allocation there is no problem. I believe
that this is what the non MMU version of his OS does. You still don't
have seperate zero pages though :(
-Ralph