home .. forth .. colorforth mail list archive ..

Re: [colorforth] multitasking


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 16 October 2004 01:08 am, Howerd Oakford wrote:
> I would like to add at least two more tasks to handle serial and
> ethernet comms, as these are asynchronous too. I would not use a
> generic task creation word - it is much simpler to compile as many
> tasks as you need when you re-build the system. But this must wait
> until all of cf is ported to cf and it can build itself...

If we add two more tasks for that, then why not two more tasks still for 
other things, like handling events that come from, e.g., parallel port 
devices, or hot-swappable I/O devices like USB?

The answer to this is to be able to add many tasks to the system, on an 
as-needed basis.  Last I checked, ColorForth didn't provide such a 
system, as it didn't foresee arbitrary growth in this fashion.

Is it possible to add such a capability to ColorForth without adversely 
affecting the simplicity of the system?

I see it as being possible to add a third system array, an array of 
tasks.  When EMPTY is invoked, it resets the task pointer just like it 
resets the two dictionary pointers.  Tasks beyond the "next task to be 
allocated" fencepost then wouldn't be allowed to take control of the 
system via PAUSE.

Would this be an acceptable solution?

- --
Samuel A. Falvo II
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBcTKSvwDm/l0jx/IRAssOAJ0RceQMD7zC62N5p5+XXAvk7Zos5wCggfjc
nm3dQ0Js0aIU9Tho+yzHhTQ=
=nfjD
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com