Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Beginners Forth? And TCP/IP too?

282 views
Skip to first unread message

Franklin's SpamTrap

unread,
Mar 18, 2004, 4:13:55 PM3/18/04
to
Hi all,

I was wondering about a beginner's Forth, a free/cheap x86 one that
doesn't require a host OS, and with a functioning TCP/IP implementation.
I suppose it's too much to ask for, but searching around hasn't given me
any luck.

Pygmy Forth is my best find so far, it has serial comms worked out (for
a small price) so it shouldn't be too hard to learn on. Any others?

I was thinking of playing around with talking to my POP3 and SMTP
servers for fun... :-) It seems like a good way to learn doing something
"usefull", but not requiring a soldering iron.

What do people do for NIC drivers and TCP/IP stacks? Roll their own, or
is there a (downloadable) reference NE2000 TCP/IP somewhere out there?

tia+br

Franklin

Tyler

unread,
Mar 18, 2004, 10:28:09 PM3/18/04
to
Franklin's SpamTrap <usenets...@hotpop.com> wrote in message news:<Fko6c.5415$EV2.35475@amstwist00>...

> I was wondering about a beginner's Forth, a free/cheap x86 one that
> doesn't require a host OS, and with a functioning TCP/IP implementation.
> I suppose it's too much to ask for, but searching around hasn't given me
> any luck.
>
> Pygmy Forth is my best find so far, it has serial comms worked out (for
> a small price) so it shouldn't be too hard to learn on. Any others?

ColorForth is standalone, and previously I was told the lack of TCP/IP
(a problem most assuredly solved by now) wasn't a big deal because
you could use UDP without problems. Nobody uses Forth to browse
the Web or get email anyway. </sarcasm>

There are C implementations aplenty on the Web if you feel like
translating a TCP/IP package for your Pygmy system. The most
recent I've run across is uIP, which is an open source project
aimed at networking microcontrollers:

<http://www.dunkels.com/adam/uip/>

Theoretically, one could create a floppy that would boot
directly into Pygmy if you wanted to. It seems like a lot
of work to me, just to be rid of the convenience of a file
system. YMMV.

Cheers,
Tyler

m-coughlin

unread,
Mar 19, 2004, 5:19:15 PM3/19/04
to

If you don't want to use a host operating system, you have
very little to choose from. Pygmy Forth is interesting for
learning about Forth but it runs under MS-Dos. There are a few
stand alone Forth systems for the various Intel processors. They
only work on hardware that is the same as the kind they were
developed on. Albert van der Horst has written a stand alone
version of his ciForth. Version 3 of this worked on half of my
IBM-PC clones, but his version 4 wouldn't work on any of them. I
don't know if he has fixed the problem.
http://home.hccnet.nl/a.w.m.van.der.horst/ciforth.html
I do not know of any other Forth system that will work on a
computer that I am willing to use without an operating system. I
am very much interested in such systems, but there is a risk
involved. A bare Forth has no security and it has no
restrictions. If you make a mistake, you can wipe out your hard
drive. So I will not use it on a system where I have stored data.

TCP/IP is not something you would want to code as a
beginner. One reason Unix and C are so widespread is because
workable TCP/IP code was developed in C and could be ported to
various flavors of Unix. Doing the same in other languages and
operating systems was not fast or easy. I guess there is TCP/IP
code written in Forth but I don't think it is to be found in a
free/cheap x86 system. Writing such a thing is an opportunity
for an ambitious programmer to establish a good reputation.

--
Michael Coughlin m-cou...@comcast.net Cambridge, MA USA

jonah thomas

unread,
Mar 19, 2004, 9:09:27 PM3/19/04
to
m-coughlin wrote:

> I do not know of any other Forth system that will work on a
> computer that I am willing to use without an operating system. I
> am very much interested in such systems, but there is a risk
> involved. A bare Forth has no security and it has no
> restrictions. If you make a mistake, you can wipe out your hard
> drive. So I will not use it on a system where I have stored data.

If you're going to use a Forth with no OS then it deserves its own
machine. Why run it on the same machine as some OS? The OS is as
likely to cause trouble for the Forth as the other way around, and
either way it's trouble you don't need.

> TCP/IP is not something you would want to code as a
> beginner. One reason Unix and C are so widespread is because
> workable TCP/IP code was developed in C and could be ported to
> various flavors of Unix. Doing the same in other languages and
> operating systems was not fast or easy. I guess there is TCP/IP
> code written in Forth but I don't think it is to be found in a
> free/cheap x86 system. Writing such a thing is an opportunity
> for an ambitious programmer to establish a good reputation.

I'm not the best person to comment on this since I started to do
TCP/IP to get some idea where the problems were and quit. But TCP/IP
didn't look that hard to me. What looked hard was to either connect
it to the WinSock system, or else get it running over ethernet. You
can't truly test it until you have it connected to foreign systems.
And that means dealing with hardware issues that have nothing to do
with TCP/IP.

TCP/IP appeared to be pretty much self-contained except where it
explicitly used ethernet. I could read a section, get a sense of how
to code it, and then find C code online that purported to do the work
and compare that my code got the same result. There was some tedium
to it but it didn't look tremendously difficult. The problem was that
in reality it wasn't self-contained and I needed to learn too many
other things at the same time. Someone with the right background
might do very well.

Jos van de Ven

unread,
Mar 20, 2004, 5:41:08 AM3/20/04
to

At http://home.planet.nl/~josv you can download 4ePost which
manages TCP/IP, SMTP, POP3, and NNTP.

It "only" needs W95 and IE4 or better.

Jos

==
4ePost: 943 bytes in mail. Elapsed time to buffer: .000318 sec.

Albert Lee Mitchell

unread,
Mar 20, 2004, 4:57:02 PM3/20/04
to
On Thu, 18 Mar 2004 22:13:55 +0100, Franklin's SpamTrap wrote:

> Hi all,
>
> I was wondering about a beginner's Forth, a free/cheap x86 one that
> doesn't require a host OS, and with a functioning TCP/IP implementation.
> I suppose it's too much to ask for, but searching around hasn't given me
> any luck.

If you're going to use a Forth without an underlying operating system
then choose an embedded controller and not an x86 platform. This
complicates implementation of tcp/ip though.



> Pygmy Forth is my best find so far, it has serial comms worked out (for
> a small price) so it shouldn't be too hard to learn on. Any others?

Pigmy Forth is a great system but still rides on top of an operating
system, DOS.



> I was thinking of playing around with talking to my POP3 and SMTP
> servers for fun... :-) It seems like a good way to learn doing something
> "usefull", but not requiring a soldering iron.
>
> What do people do for NIC drivers and TCP/IP stacks? Roll their own, or
> is there a (downloadable) reference NE2000 TCP/IP somewhere out there?

We wrote our own, no mean task either. Most embedded micros don't have
the h/w resources for handling a large number of sockets or simultaneous
connections. We elected to use a h/w part which does much of the grunt
work, the WD3100 by iinchip. http://www.amresearch.com:2005/

-- Regards, Albert
----------------------------------------------------------------------
AM Research, Inc. The Embedded Systems Experts
http://www.amresearch.com 916.780.7623
----------------------------------------------------------------------

Stephen Pelc

unread,
Mar 22, 2004, 9:20:26 AM3/22/04
to comp.lang.forth
On Thu, 18 Mar 2004 22:13:55 +0100, Franklin's SpamTrap
<usenets...@hotpop.com> wrote:

>I was wondering about a beginner's Forth, a free/cheap x86 one that
>doesn't require a host OS, and with a functioning TCP/IP implementation.

You may find Charles Esson's ColdForth on the net somewhere. This
had a TCP/IP stack AFAIR.

The other TCP/IP stacks I know of are commercial products, including
MPE's PowerNet, for which see:
http://www.mpeltd.demon.co.uk/powernet.html

In general, writing a TCP/IP stack from scratch is a *big* job.
Satisfying the RFCs is one problem. Making it work with
everything else is another.

Stephen
--
Stephen Pelc, steph...@INVALID.mpeltd.demon.co.uk
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads

0 new messages