Screen Editor
-------------

This is the documentation for ED.BLK - a full-screen editor
for Laxen & Perry's F83 Forth v2.1.0 for the IBM-PC.

In this version of the editor, IBM-PC's special keys - the
arrows, PgUp, PgDn, Home, Insert and Delete keys may be used
in addition to the control-key sequences given below.


Installation
------------

To install the editor, enter the following:

   A> F83

   OPEN ED.BLK

   1 LOAD

After the load has completed the new editor will be installed
and a copy of the new forth system saved to disk (as F83-ED).



General screen commands:
------------------------

 EDIT  ( u -- )

     Enter the full screen editor, selecting screen u for 
     editing.

 WHERE  ( ln scr -- )

     Used after a LOAD error, WHERE performs the same function as 
     EDIT but the screen and the cursor position are  
     automatically set to the location where the error occured.

     Note: the parameters for this command are NOT entered by the
     user - they are automatically placed on the stack by F83's
     error handler.

 L  ( -- )          List

     Lists the current screen.  The screen number is obtained 
     from the variable SCR and is set by LIST, EDIT or when a 
     LOAD error occurs.

 N  ( -- )          Next

     Increments the screen number by one.  Typically used 
     immediately before the L command.

 B  ( -- )          Back

     Decrements the screen number by one.  Typically used 
     immediately before the L command.


Editor commands:
----------------

NOTE: After editing a source screen, ensure the changes are made 
permanent by entering the update command (ctrl-K) before moving 
to another screen or exiting the editor.


1. Cursor movement

Ctrl-E    Move cursor up.

Ctrl-X    Move cursor down.

Ctrl-D    Move cursor right.

Ctrl-S    Move cursor left.

Ctrl-I    Move cursor 4 places to the right (HTAB).

Ctrl-Q    Move cursor to the upper left of the screen.


2. Editing

Ctrl-G    Delete the character to the right of the cursor.

Ctrl-H    Delete the character to the left of the cursor.

Ctrl-T    Erase all characters to the right of the cursor.

Ctrl-O    Insert a space at the current cursor position.

Ctrl-Y    Delete the current line.  Lines below the cursor are 
          moved up one position.  Pop a line from the circular 
          buffer into the bottom line.

Ctrl-N    Insert a blank line.  Lines below the cursor are moved 
          down one position.  Push the bottom line to the 
          circular buffer.

Ctrl-W    Split the current line at the cursor position.

Ctrl-F    Join the next line at the cursor position

Ctrl-A    Copy the contents of the current line to the one-line 
          buffer.

Ctrl-P    Copy the contents of the one-line buffer to the current 
          line.

Ctrl-K    Update all changes made to the screen.


3. Miscellaneous

Ctrl-C    Move to the next screen.

Ctrl-R    Move to the previous screen.

Ctrl-J    Jump to another screen.

Ctrl-Z    Clear the screen or circular buffer.

Ctrl-B    Redraw the screen.

Ctrl-L    Reload the current file block.

Ctrl-V    Toggle between insert or overwrite mode.

Ctrl-U    Exit the editor.


Other issues:
-------------

1. KEY behaviour changed
 
Many F83 IBM-PC users choose to change the action of KEY so as to
overcome a problem caused by the IBM-PC keyboard.  In forth, KEY
waits for a keypress and returns the code of that key.  However,
some keys on the IBM-PC keyboard (Ins, Del, Home, End, PgUp etc.)
return two codes when pressed instead of one making the use of KEY
somewhat problematic.  The usual solution has been to change KEY
as follows.

When one of the aforementioned keys is struck, KEY adds 128 to the
value of the second code and returns this to the user.  The first
code is discarded.

In F83, KEY is a vectored word meaning that it's action may be
altered.  Normally, KEY calls the word (KEY).  The full-screen
editor has defined a new word PCKEY and then redirected KEY to
use PCKEY instead of (KEY).  The new behaviour of KEY is as
described in the previous paragraph.

The only time this new KEY will pose a problem is where an F83
application expects the old behaviour.

