[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

Re: IPS for Linux or Java

Maggie, K3XS came FORTH with the following reply:

> There already is a PalmPilot FORTH interpreter called "Quartus".
>  http://www.quartus.net

Great -- so it should be pretty easy to write an IPS front-end in FORTH.
Then you can have IPS on a Palm/Handspring/Clie. Not that it would be very
useful, but it COULD be done!
> > Karl/James book available (for ~$40 depending on where you live) from James
> > at
> >          http://www.jrmiller.demon.co.uk/products/ipsbk.html
> BTW, that page says AMSAT-NA has copies for sale--last time I talked to Martha
> about it, they didn't have any more. For people who know FORTH already, the
> downloadable doc from that site is probably enough for you to understand what's
> going on.

I know that James has copies in the UK. Rick (W2GPS) recently got a copy
from him. Even a FORTH freak should get a copy, because it documents the
details. And because James makes significant contributions from the

> > Wouldn't it be better to write an IPS (or FORTH -- they are virtually
> > equivalent)...
> Well, a *big* difference, especially for embedded applications like the IHU is
> the fact that IPS can multitask...this is something that no FORTH implementation
> I've ever used does, that I'm aware of.

If you read the IPS book, you will find that IPS's multi-tasker is written
in the IPS portion and only requires that there be a guaranteed real-time
interrupt (50 Hz is the norm). 

The multi-tasking is implemented as a never-end loop (Karl calls it the
CHAIN). The applications I know of have 8 slots) into which tasks or NO-OPs
are inserted. Remember that IPS executes addresses, each time PUSHing a
return address onto the address stack. The addresses eventually lead to
executable native code and then POPs from the address stack bring you back
where you started (which is why IPS and FORTH are called Threaded
Languages). So the chain merely consist of the addresses of tasks to be
performed or the address of NO-OP. The last CHAIN address points back to
the start of the chain. A task can put another task on the CHAIN. An
ENCHAINed task requires the discipline to remove itself from the CHAIN when
it is done. All the ENCHAINed tasks need to complete in a time less than
one clock tick (i.e. 20 msec in the case of the 50 Hz interrupt). The tasks
communicate by means of the parameter stack, so task discipline is required
to leave the parameter stack in a predictable state when a task is done.

Regarding multi-tasking FORTH, the chain was also used by Chuck Moore in
the original FORTH he developed for telescope control at the National Radio
Astronomy Observatory in the early '70s. Karl took his inspiration for IPS
from Chuck's work.

> Making that statement ought to surface all the closet FORTH freaks on-list who
> have multitasking 64-bit implementations running in their iPaqs or IBM Linux
> Watches. :-)
>  "FORTH YOU LOVE IF HONK THEN" --geek bumpersticker from the 1980s....


   "DONE WHEN STACK UP CLEAN" which almost makes sense both forward and

73, Tom
Via the amsat-bb mailing list at AMSAT.ORG courtesy of AMSAT-NA.
To unsubscribe, send "unsubscribe amsat-bb" to Majordomo@amsat.org