Fri Jan 2 18:04:23 EST 2015

Forth tasks

Been down this path before.  Previous attempt was coroutines /
generators, i.e. synchronous unidirectional / bi-directional message

Let's try asynchronous message passing.

And let's try to get this to work in the emulator first.

And let's forget about Forth and do this in a more general language
that can be "instantiated" into fixed structures.
Or let's not and keep it simple..

What is a task?  It has:
- a pid
- a mailbox
- a data stack
- a return stack
- local storage

Should local storage be read-only like erlang?

What does a message look like?

What can we do without garbage collection?  Try with a simpler
representation first.

- Messages are bytes.  
- Mail boxes are circular buffers.
- Buffer & stack overrun causes system reset.
- Scheduler is round-robin
- Tasks and their buffers & stacks are statically allocated
- Named variables go on the return stack