TForth

I once discovered this abandoned DOS Forth on my own home page, and noticed that it (after a few bug fixes) wasn't all that bad. It's a direct threaded Forth, with its kernel of less than 4kB (or with everything compiled, about 9kB), it's a pretty small and non-bloated system. I got a lot of inspiration from isForth, but TForth is smaller and is NOT compatible with any other Forth (which, by the way, is a proud tradition within the Forth community). Now I have added support for hashed dictionaries (which makes it quite a lot faster, about 30%), and converted to FASM (which is about 3 times faster than NASM). Together these changes reduce the build time from about 45 to 15 seconds on my 386. TForth is now also tested in my 286 laptop, and it runs fine! Unfortunately FASM requires a 386, so it can't be completely built from scratch on a 286.

Features

To do

Getting started

First of all, read the documentation. But if you just want to give it a try, here is how you run the demos (prime.f, ant.f):

  1. Start tf.com (if you don't have this file, run build.bat to build it)
  2. Type: fload demo\ant.f
  3. Type: use ant
  4. Now the words in ant (or prime, if that's what you loaded) are ready for use. Just type the name of the word you want to use and press enter. The ant.f program uses "run" to start the demonstration.

Downloads


Home |About me |Chinese |Research |Software |Electronics |Radio