       ͻ
        Lesson 6 Part 160  F-PC 3.5 Tutorial by Jack Brown 
       ͼ


Following is the Documentation for the JBLEDIT Program.

  Program Name:  LEDIT
  Author:        Jack W. Brown.
  Original Date: November 23, 1985.
  Last Modified: October 5, 1988.  Converted from L&P F83 to Zimmer's F-PC

  The Ledit Program is completely in the public domain and may be freely
  modified for fun and profit.

  Files
  JBLEDIT.DOC  The file you are reading.
  JBLEDIT.SEQ  The file that contains the source code.

  LEDIT is a string/command line editor with the same line
  editing command set as the popular MS-DOS PD/Shareware command
  line editor DOSEDIT.  It can be used as a string/line editor for
  your applications or as a replacement for FORTH's EXPECT.

  LEDIT uses a special set of the keys on the IBM PC keyboard
  to allow you to edit a Forth command/string you are entering or one
  of the previous commands that you have entered.  It keeps a command
  stack of the last 256 characters of commands that you have entered and
  you can scroll back and forth through this stack.  It also allows you
  to edit the current command being displayed.  NOTE:  1 or 2 character
  commands are not saved.

  Commands that are the same as DOSEDIT

  PGUP             Scrolls backward through the command stack.
  PGDN             Scrolls forward through the command stack.
  UP arrow         selects the next line up
  DOWN arrow       selects the next lines down
  ESC              Clears the command line.
  LEFT arrow       Moves the cursor left one position.
  RIGHT arrow      Moves the cursor right one position.
  HOME             Moves the cursor to the beginning of the command line.
  END              Moves the cursor to the end of the command line.
  INS              Toggles the insert function.
  DEL              Deletes the character under the cursor.
  CTRL-left arrow  Moves the cursor left a word at a time.
  CTRL-right arrow Moves the cursor right a word at a time.
  CTRL-HOME        Erases from the beginning of the line to the cursor.
  CTRL-END         Erases from the cursor to the end of the line.
  CTRL-PGUP        Erases the command stack.
  CTRL-PGDN        Erases the displayed entry from the command stack.
  BACKSPACE        Remains unchanged.

  Additional Commands Not Included in DOSEDIT

  TAB              Tab forward 5 positions.
  CTRL-L           Clear screen and redisplay current line at top.
  CTRL-Q           Jump to first occurance of next character entered.
  CTRL-S           Same as left arrow.
  CTRL-D           Same as right arrow.
  CTRL-T           Delete word cursor is on.
  CTRL-I           Same as TAB
  CTRL-U           Delete entire line (same as ESC).
  CTRL-X           Delete to end of line (same as CTRL-END)

  ALT-D            Drag cursor character forward.
  ALT-S            Drag cursor character backward.

  There may be a few I forgot to document, can you find them?



  The function keys F1-F6 no longer have assigned functions.

  Tutorial:

  After starting F-PC enter the following at the Forth ok prompt

  FLOAD JWLEDIT.SEQ <enter> ok
  NEW-EXPECT <enter> ok
  .( HELLO ) <enter>
  .( WORLD ) <enter>
  .( IT'S ME ) <enter>

  Now use the PgUp key to see the last command .( IT'S ME).  Again
  use the up PgUp key to see the preceding command .( WORLD).  Now
  press enter to execute that command.  Then press the PgDn key to
  see the following command .( IT'S ME).  Press either the PgUp or PgDn
  keys several times to see how the commands wrap around.  Use the
  Esc key to clear the command line.  Enter new commands and use the
  control keys defined above to become familiar with all the functions.

  Use the Up-arrow and Down-arrow keys to pull previously entered text from
  the screen above and below you current line.  Use the editing commands
  to edit the line pulled back and press <enter> to execute the line.
  Press Up-arrow and Down-arrow several times to see how the lines wrap.
  Finally, to turn off LEDIT type:

  OLD-EXPECT <enter> ok

  Good Luck.
