If you are using TDS-PC for Windows you may not ever need the TDS9092 full screen editor. Work with a word-processor in the PC instead. If you are using a dumb terminal then the full screen editor will be your main way of writing Forth source code.
Forth can be compiled interactively line by line or an editor can be used to format source code, which is then compiled. The latter has the advantage of keeping the source code for later modification and documentation. The TDS9092 has an editor designed to work with simple terminals or through the serial input-output port of a PC.
Interactive use is possible even with hand-held terminals. For the full screen editor the terminal should have an 80 x 24 screen and 2-character sequences which will send the cursor up, right and home. A code sequence is also needed to home and clear the screen. ASCII codes hex 08 and 0A are used for left and down.
There are 13 screens available. Screen 0 does not give an error but is not physically available. Do not use it. The screens act in the same way as disk on larger Forth systems. The operating software uses virtual memory to access them but this is not apparent to the user.
The screens are at addresses 8000 to B3FF, each one having 0400 bytes (1024 in decimal). The area B400 to BC07 comprises two virtual memory buffers. The applications program has all the RAM 8000 to BC07 (15K bytes) available since the editor is only used for program generation.
On power-up all the screens are disabled. To enable them you need to type $B400 06 +ORIGIN ! (see COLD START PARAMETER TABLE). The screens will be filled with random data, but a ctrl+B will blank the screen once you are in the editor. The reset button and RESET* signal in at the connector both give warm starts preserving source code and dictionary.
To enter the editor type 1 EDIT to enter screen 1, then type ctrl+B. After a moment a blank page is presented on which source code can be written and edited.
The cursor is in a box of size 64 characters 16 lines. These are the 1024 bytes of the Forth screen in memory. The bell marks any of the four limits.
If the full screen editor does not appear to work this is because the control codes in the Forth computer do not correspond with those needed by the computer or terminal. If using a PC type IBM return, otherwise see SETTING THE TERMINAL for details of how to change the codes.
FULL SCREEN EDITOR COMMANDS
The full screen editor control commands in the following table are available.
3 5 COPY moves screen 3 to screen 5. This is used outside the editor, i.e. interactively. The up, down, left and right commands allow modification of text anywhere on the displayed screen. The return key moves the cursor to the start of the next line. When the source code is complete the editor should be left using ctrl+Q and compilation accomplished in the usual Forth manner, e.g.
4 LOAD compiles screen 4 (and successive ones as long as --> appears in the screen).
On error the abort point of the compiler can be easily found. WHERE re-enters the editor at the bad screen, and the cursor is placed where the compiler stopped. Note that the actual error may be at this point or a little way before it.
When power is applied to the TDS9092 the system transfers 28 bytes of terminal information to RAM at locations BE10-BE2B. You can alter all the terminal parameters. The table under DUMB TERMINAL SUPPORT shows their addresses, values allocated at power-up and functions. Alternatively use any of the standard code sets built-in using the words shown later.
DEFAULT VDU CODES
For example if ESC R homes the cursor on your terminal then re-set location BE24 to these ASCII codes 1B and 52 as follows:
HEX 1B52 BE24 !
On changing command keys do not allocate the same code twice.
The codes in the table above fit many terminals including ADM3A, Televideo, VC4604, etc., and they can be re-set at any time by typing STD . The next most popular code set is for Digital Equipment Corporation terminals. Just type VT52 if you have a VT52 or VT100 terminal and appropriate codes will be allocated.
This is a table of all the different terminal editor control sets built into the TDS9092. Remember that the only purpose is for use with the full screen editor and associated words UP DOWN RIGHT LEFT HOME PAGE . If you are not using the editor or any of these words you need not have the codes set correctly.
The word BBC also sets cursor movement codes appropriate for Viewdata.