forth interpreter as kernel module

From: David N. Welton (davidw@dedasys.com)
Date: Thu Apr 04 2002 - 18:49:03 EST


[ please CC replies to me ]

Hello,

Once upon a time, I had a rather random idea, and, acting on it, I
wedged a forth interpreter into the Linux kernel. I've always wanted
to clean it up and do things nicely, but have never really found the
time or the motivation.

So, I am posting here, in the hope that someone might find the idea
interesting and take it up, or, better yet, think of something that it
might actually be used for (this was besides the point when I did it).

I doubt the code itself is of much interest. Actually, I'm pretty
embarassed about it, but decided to make it available despite that.

It does run, on my system (2.4.18):

@grantspass [/home/davidw/workshop/pforth-21] # insmod kpforth.o
Warning: loading kpforth.o will taint the kernel: no license

@grantspass [/proc] # echo 3 . > kpforth
@grantspass [/proc] # cat kpforth-out
pfLoadDictionary - Filename ignored! Loading from static data.
Static data copied to newly allocated dictionaries.
Begin AUTO.INIT ------
3 ok
Stack<10>

Although from what I recall when experimenting with it, there are some
definite 'issues'. See aforementioned disclaimer about the code. It
doesn't interface with the kernel in any interesting ways, either.

Anyway, for the interested/bored/adventerous, the code may be found
at:

http://www.dedasys.com/freesoftware/files/kpforth-21.tgz

The original forth system that I based it on - pforth - which is much
better code then mine, is by Phil Burk.

I would be interested in comments on what should be fixed in the code,
although I may not have time to act on them.

Anyway, hope this is of interest to someone, and thank you for your
time,

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 07 2002 - 22:00:15 EST