Get it running

If you haven't already, please go over and deal with installing ForthOS.

Command line input

ForthOS provides command line input with editing and history. The editing keys are EMACS-like: You can display the history with the "history" word (duh).

Multiple screens

The VGA driver runs the screen in text mode... no fancy GUI, but the code to drive it is simple and compatibility problems are minimal! Although you don't have windows, you do have multiple screens. If you have interesting output on one screen, and you don't want to disturb it, use the keys F1 through F4 to "flip" to another screen. Each screen has its own context and CLI, so you can be listing something in one screen, have an editor running in another, and be doing math and what-not in a third.

Auto-stop output

One perpetual hassle with Forth is that many kinds of output can stream by your screen faster than you can read it. In the day of 300 baud modems, the eye could keep up--with 3 gigahertz processors on a memory mapped display, it's a little more challening.

In the older Forth days, some words like "words" had a pause built in. After a screenful, the output would pause, and you could hit space to keep going, or return to quit. Of course, over time more and more words might end up with larger-than-screen outputs, so it was a bit of a losing battle to retrofit auto-pause into each word as it bothered you.

ForthOS solves this by having the TTY driver implement the auto-pause. The driver is keeping tally of the number of output lines which have been emitted with no user interaction. When it's about to scroll something off the screen which has been put up since the last time the output was paused (roughly, since the last time the system waited for you to hit a key), the output blocks instead. If you hit almost any key, output continues. If you're tired of seeing the output, you can hit ^C (control C) and an abort is thrown to the application doing the output.

Sometimes you'll have long-running apps, whose output slowly but surely fills the screen. In these cases, it might be OK for the output to have scrolled away without your intervention. For these cases, simply type a key (which is then buffered to the typeahead queue). When the system is going to do auto-pause, if it sees that there is typeahead, it'll keep going instead.

Accessing any vocabulary

In classic Forth, the system maintains a search order of vocabularies which it will search in resolving a word. The word "order" displays the list of vocabularies to be searched, and also the vocabulary which will receive any definitions you make.

All of this is true in ForthOS also. However, there are some vocabularies whose words are used only periodically, and in a fashion disjoint from all the vocabularies in the actual search order. For instance, you might want to change your current directory with the "cd" word located in the "fs" (filesystem) vocabulary. In classic Forth, you simply had to add "fs" to your search order, use "cd", and then remove it back out of your search order.

In ForthOS, you can instead simply name the word with "". If the word "" itself is found in your search order, it'll be used as normal. However, if the word is unknown, the system then looks for a vocabulary named "fs", and then for the word "cd" within it.

This facility is also useful when you want to name one specific word's implementation even if the word is defined differently in different contexts. For instance, "forth.load" is the classic Forth word to load source from a single block. "fs.load" instead parses a filename argument, and then loads the range of blocks under the named file.