home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
beehive
/
cpmforth
/
sedit10.lbr
/
SEDIT10.DZC
/
SEDIT10.DOC
Wrap
Text File
|
1979-12-31
|
5KB
|
132 lines
SEDIT.DOC
A full screen editor for the Laxen & Perry F83 forth.
Unlike the simple line editor provided with F83, this full-screen
editor allows the user to modify a forth source screen quickly and
easily with a minimum of trouble. Just move the cursor anywhere on
the screen and make the desired changes. What you see, is what you
get.
Hopefully the release of this editor will encourage those who had
previously 'had a go' at forth but were frustrated by the awkward-
ness of single-line editing. Not only is this editor quite usable,
it can also serve as a useful learning tool. You are encouraged to
modify it or add extra features - all easily done with forth.
SEDIT is an enhanced version of the editor which appeared in the
book 'Forth - A Text and Reference' by Kelly and Spies. Improved
screen display, error checking and re-coding of some commands now
makes this editor virtually bomb-proof. We would be surprised if
you find any bugs in it.
1. Installation:
As supplied, this editor is configured for use with computers and
terminals that support the following screen and cursor control
codes.
Clear Screen 1Ah
Erase to End of Line 1Bh 54h
Cursor Positioning 1Bh 3Dh (row) (col)
Cursor Right 0Ch
Cursor Up 0Bh
Backspace 08h
Line Feed 0Ah
If your machine's codes are different you will need to alter the
definitions on screen 3 of SEDIT.BLK (using F83's line editor).
2. SEDIT Commands:
a) Cursor movement -
Ctl-D Move cursor right one character.
Ctl-S Move cursor left one character.
Ctl-E Move cursor up one character.
Ctl-X Move cursor down one character.
Ctl-I Horizontal tab (currently set to every fourth column).
Ctl-Q Set cursor to home position.
(Should your keyboard be equipped with arrow keys you may wish to
alter the definitions on screen 10 and let the arrow keys move the
cursor around.)
b) Edit functions -
Ctl-G Delete next character.
Ctl-H Delete previous character.
Ctl-T Erase all characters from cursor position to end of line.
Ctl-O Open text, inserting a space at the current position.
Ctl-Y Delete a line and place into circular buffer.
Ctl-N Insert a line from circular buffer and move existing lines
down one position. Last line moves into the circular buffer.
Ctl-A Place current line into the single-line buffer.
Ctl-P Overwrite current line with the text in the line buffer.
c) Block functions -
Ctl-C Jump to next screen in current file.
Ctl-R Jump to previous screen in current file.
Ctl-K Marks the current screen as updated. (See note below)
Ctl-L Restore screen to unmodified condition.
d) Miscellaneous -
Ctl-Z Clear screen or circular buffer.
Ctl-V Toggles insert mode.
Ctl-U Exit editor
3. Notes:
This editor actually has two buffers - a single line buffer for
storing and retrieving a line of text and a novel circular buffer
which holds up to sixteen lines deleted by the ctrl-Y command. If
enough lines are deleted using ctrl-Y, one eventually finds the
old deleted lines starting to reappear on the screen. Thus deleted
lines are never lost except through delete character or erase to
end of line. A deleted line may be restored by using ctrl-N.
Should the circular buffer fill up with all manner of junk, it can
be cleared with the ctrl-Z command.
Entering the editor is done with the command - 'n SEDIT' where n
is the screen number to be edited. After editing a screen, it must
be marked as updated by using the ctrl-K command. Failure to do so
will result in the changes not being written to disk. Control-K
should be issued BEFORE moving to another screen. Control-U exits
the editor.
SEDIT assumes that you have patched F83's MS command to suit your
cpu clock speed. If not, then do it now. Load F83.com and type the
following line -
BEEP 30000 MS BEEP <return>
This should give a delay between the two beeps of 30000 milli-
seconds (ie. 30 seconds). If the delay is not correct then you
will need to adjust the value of the variable FUDGE. For a 4Mhz
Z80 microprocessor this is set to 10.
eg. 10 FUDGE !
Once you have found the correct value for FUDGE, save a new ver-
sion of F83 with 'SAVE-SYSTEM F83-NEW.COM'. If you want the new
F83 to include the SEDIT editor permanently, then simply load
SEDIT before doing the SAVE-SYSTEM.
Well that's it. You will find that editing forth screens is no
longer the laborious task it once was. Of course, many extra
features could be added to SEDIT but we will leave that for you
to do.
lt in the changes not being written to disk. Control-K
should be issued BEFORE moving to another screen. Control-U exits
th