[comp.lang.forth] Applicability of Forth for Embedded Control

gil@jtsv16.jts.com (gil hauer) (07/24/90)

Hello Forth-ers:

Being a novice in Forth, I have a question that I would like to
forward to this group since I don't feel I have enough knowledge to
answer it.

I am involved in a project to build an embedded controller (based on
an i80188). What are the advantages/disadvantages of using Forth
environment in the controller over a compiled 'C' program?

I don't wish to start a "religious" war of Forth vs. 'C'. I am just
looking for a little information.

As an aside, I just picked up TILE Forth from alt.sources. I am using
this Forth environment for learning and would like to port it to the
80188. Does anyone have any experience in doing this?

	Regards,

	Gil


-- 
+-----------------------------+-------------------------------------------+
| Gil Hauer, Tech Noir Inc.   |       gil@jtsv16.jts.com                  |
| Toronto +1 416 653-8276     |  or:  uunet!jtsv16!gil                    |
+-----------------------------+-------------------------------------------+

jax@well.sf.ca.us (Jack J. Woehr) (07/25/90)

gil@jtsv16.jts.com (gil hauer) writes:

>I am involved in a project to build an embedded controller (based on
>an i80188). What are the advantages/disadvantages of using Forth
>environment in the controller over a compiled 'C' program?

	Advantages:

	- No steenking operating system.

	- Built-in parser, interpreter, user interface.

	- Interpretive environment. Test each function as you define
it. Bang hardware interpretively for faster debugging. Hi-level debugger.

	(PS, don't build your own 80188, buy one from me with a fine,
hundreds-of-proven-installations Forth-83 on it. Email me your snail
address and I'll send you the Vesta Technology Inc. catalog of single
board computers with Forth, C and Basic on them. jax@well.UUCP,
{hplabs,pacbell,ucb}!well!jax)

	- Forth designed for realtime control, C designed for minicomputers.
(See my articles in "Embedded Systems Programming" magazine over the
last year or so)

	Disadvantages:

	- There are about 1,000 C programmers for every Forth programmer.

	- When your project fails, you don't have an arcane compiler and
debugger to take the blame for you.

	- People think you are crazy for preferring a language *designed*
for realtime control to a language designed for enriching AT&T.

>As an aside, I just picked up TILE Forth from alt.sources. I am using
>this Forth environment for learning and would like to port it to the
>80188. Does anyone have any experience in doing this?

	TILE is a little elaborate for what you have in mind. If,
in the tradition of Forthers everywhere, you decide to roll your own,
start with F83 by Laxen & Perry, or FIG-FOrth, or F-PC Forth, it's
easier.

	Good luck, friend!

 <jax@well.{UUCP,sf.ca.us} ><  Member, >        /// ///\\\    \\\  ///
 <well!jax@lll-winken.arpa >< X3J14 TC >       /// ///  \\\    \\\/// 
 <JAX on GEnie             >< for ANS  > \\\  /// ///====\\\   ///\\\ 
 <SYSOP RCFB (303) 278-0364><  Forth   >  \\\/// ///      \\\ ///  \\\

peter@ficc.ferranti.com (Peter da Silva) (07/26/90)

> I am involved in a project to build an embedded controller (based on
> an i80188). What are the advantages/disadvantages of using Forth
> environment in the controller over a compiled 'C' program?

For one thing, the testing and debugging environment... even if you still
have to blow proms... will save you weeks of accumulated time spent waiting
for minor bug fixes to be blasted into silicon, guessing where you need to
put debugging code (and getting it wrong), parsing tables by hand from
a hex dump, looking for places to cram patches, etc.

Unless you're working with a large team (which pretty much implies you're
not doing a small embedded controller) Forth will save your bacon. If you
are, make sure all your guys have the discipline not to step on each others
toes and are willing to dump all the high-ego private wordsets in the
trashcan.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
<peter@ficc.ferranti.com>