> If Bob holds out any longer, he should not be surprised if he sees a crowd > outside his window with torches and pitchforks.. or whatever implements an > angry engineering mob takes to a lynching. > > Vitaliy Ok, ok... you can leave the pitchforks at home, although you want feel like getting them back out when you read my idea. Just remember, I did warn you that you might think I am 'cheating'. My idea is simple this: implement Forth, or a similar threaded language. In this case the executable code is a combination of interpreted address lists and ordinary machine code. However, instead of using the machine stack, Forth uses its own internal data and procedural stacks. The pre-emptive multitasking is done in the "Next" routine of the Forth interpreter. Note that interrupt level code would likely still be written in assembly, and that interrupts could remain enabled at all times. The interrupt handlers would just set flags which the preemptive scheduler would notice when it next got control. This idea is, of course, very similar to some which have already been mentioned on this thread. -- Bob Ammerman RAm Systems -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist