System Interface

The default system interface is the Flux Color Code Editor or ColorEd. It is a block editor in that it edits 1024 byte chunks of memory. Yet it also has some of the characteristics of a sequential text file editor, eg it makes use of line breaks. It also knows all about inserting color tokens instead of normal ASCII blank spaces and coloring the following words to suit. It operates the keyboard in standard QWERTY.

ColorEd also does the job of the conventional interactive Forth terminal, albeit in a slightly different manner. In Enth, Block 0 has been designated the terminal input block (yes just like the old terminal input buffer :). All other blocks are for code or data much the same as usual.

When the system starts up it starts ColorEd editing at the top of Block 0. The programmer types in as though it were a normal command line then presses the Enter/Return key. The Editor stops and the system begins interpretting Block 0. When the word OK is encountered, interpretting ceases, a new OK is prepended to Block 0, plus any error messages, and the cycle begins again.

This results in a couple of things. The screen scrolls from the top down instead of the bottom up. The current command line is always at the top of the screen. Because everything is simply prepended to Block 0, command history can be found following the command line, and to get to it, one simply has to hold down the delete key until it reaches the top of the screen (and the beginning of the block) once more. Editing code on other blocks is simple too as ColorEd is already running. One simply uses the PGUP and PGDN keys to scroll through blocks. If one saves the system source code after editing, Block 0 is of course included, so next time the system is booted, the terminal appears unaltered from where one left off.

The system itself is actually quite simple. There is no duplication of I/O functionality. All editing and text display happens in ColorEd according to what is put on Block 0. The is no distinction between Forth the terminal and Forth the editor, they are one and the same.

Get Firefox!