home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d977
/
forth.lha
/
Forth
/
Readme.doc
< prev
next >
Wrap
Text File
|
1994-04-03
|
9KB
|
212 lines
** ReadMe **
Contents:
This is an update to the MVP-Forth directory on Fred Fish disk #9.
Provided is an improved faster screen editor which uses the keyboard
cursor keys, backspace and delete keys and function keys which allow
fast moving thru the screens, pasting from PAD and the printing of
screen, triad or PAD to the printer port prt: .
F1 is the OOPs key. Control Keys give fast editing. The control keys
and Function keys can be reprogrammed by the user if desired.
Runs on Amiga 1000 and 3000. Probably on Amiga 500 and 2000 (Untested).
Amiga implementation:
On this disk are the files MVPFORTH and FORTH.
Both conform to the ' FORTH-79 Standard' and can be loaded
from the CLI or from Workbench by clicking on their icon.
MVPFORTH is a lean version with a limited number of extensions
that can be saved. To see the available words (commands) in FORTH
type: vlist <return>. The source code is in the file 'Source'.
FORTH is the one normally used. It has more extensions and can
be revised as needed by the user. To save a revised version,
type: save-forth <return>. Answer the prompt for a pathname
with df0:MYFORTH. No icon is made if saved with a
different name. Provide an Icon or load your 'MYFORTH' from
the CLI only.
On this disk are the following files that contain Forth screens:
Work, 68kAsm, Editor, ScreenEditor and Source.
Editor is the standard Forth line editor.
ScreenEditor is a screen editor written by me.
It is pre-loaded in 'FORTH' and invoked with 'Ed'.
Before you do anything else, take this disk out of the disk drive
and write protect the disk by sliding the little square to close
the opening. Then place this disk in df0: and a blank disk in df1:
and make a backup copy. Call this copy 'FORTHcopy' and store the
original disk in a safe place.
I suggest you write protect your FORTHcopy as well and return it
to drive df1:. Place a blank disk in drive df0: and make another
copy of FORTHcopy. Call this copy 'FORTH'. This will be your work
disk. To make room delete from the work disk any directories.
To create your own workfiles, copy from the cli the file 'empty'
as follows: copy empty work <return>
copy empty work1 <return>
copy empty work2 <return> as many as you want.
And to experiment with: copy editor myfile <return>
To start Forth, double click on one of the FORTH icons of the NOT
write protected work disk 'FORTH' in df0:. ( Forth must be able
to write to this disk in df0: )
***********************************************************************
-- FORTH does not ask ' Are you sure ? ' , it does what you
-- tell it to do, no questions asked. Therefore I recommend to
-- experiment first with the file 'df0:myfile' as a scratch file!!
-- Place the write protected disk 'FORTHcopy' in drive df1: to
-- recover from in case something went wrong.
***********************************************************************
A message appears on the screen and when pressing <return> you should
get a response of 'ok'.
Type: 7 select <return>
Response should be 'ok'
Type: from df0:Source
Response should be 'ok'
Type: files
Response: 0
1
2
3
4
5
6
* 7 df0:Source 136 blocks
To open the file 'Editor' you select a free number, e.g.
6 select <return>
followed by typing: from df0:Editor <return>
If you type again: files <return>
you'll see that the asterik (indicating current active file)
moved to before the number 6 and the line 6 looks as follows:
* 6 df0:Editor 36 blocks
To load this line editor type: 1 load <return>
This editor can now be invoked with the word 'editor'
Type 'files' at any time to see which files are already open and
which one is selected as the current file ( shown with an asterik )
Use for the filename the full path name.
To get your own file, type first
0 select <return>
from df0:work <return>
files <return>
You'll see:
* 0 df0:work 2 blocks
1
2
3
4
5
6 df0:Editor 36 blocks
7 df0:Source 136 blocks
If you type 0 list <return> you'll see an empty screen.
This file 'work' has only 2 screens ( = blocks ) available.
If you want to add say 8 blocks, you'll type:
8 larger <return>
Typing files <return> will show that you now got 10 blocks.
A file to be enlarged must be the current file and must be
loaded in file 0. ( You cannot make a file smaller ).
The maximum number of blocks in one file is 999, memory permitting
and is also restricted to a max of 880 blocks on an Amiga floppy.
Generally files are smaller then 200 blocks, often in the range
of 4 to 40 blocks.
To make 'Source' again the current file, type 7 select.
To see what is in there type: 0 135 index <return>
Press any key to pause the scrolling.
Press <return> to quit the scrolling.
Press any key except <return> to continue the scrolling.
To view any of the screens type the screen number followed by 'list'
e.g. 7 list <return>. If 'Editor' is loaded, you can
relist the screen by typing l <return>.
To see the next screen you could type 8 list or ll <return>
(They are 'els', not 'ones'). The previous screen: lll <return>
To see the 'words' (Forth calls commands words) available, type
vlist <return>
The scrolling can be paused the same way as explained for 'index'
The 'ScreenEditor' is preloaded in FORTH and is invoked with 'ed'.
To edit screen 9 you would type: 9 ed <return>.
To see which editing commands are available besides the arrow
keys you'll have first to open the 'ScreenEditor' file as follows:
3 select from df0:screeneditor <return> followed by:
33 list <return> and 34 list <return> will show the available
commands. Or get into the editor by typing 'ed' <return> and
pressing the help key. This works only if 'screeneditor' is the
current file as indicated by the '*' when 'files' is typed.
There is also a small built in system line editor in this version
with only the two commands 'list' and 'pp'.
They are available at any time.
When you have listed a screen, e.g. 9 list <return> and you
want to replace line 11 with ." hello world !" then type:
11 pp ." hello world !" <return>
To close file 7 df0:Source you can type 7 closefile <return>
To start experimenting pick a free file number ( use files
<return> to list them ) say 1 select <return>.
Then from df0:myfile <return> followed by 0 20 index <return>
Use this file to experiment with.
( I generally use files 0 and 1 as work and development files,
hold in file 3 the source of any Editor file if needed,
keep file 4 for the printer and use the remaining
files to hold any reference files.)
The loop constructs supported in this version are:
EndValue BeginValue DO ................. LOOP
EndValue BeginValue DO ...... StepValue +LOOP
EndValue BeginValue DO ...... StepValue /LOOP
BEGIN ......... Flag UNTIL
BEGIN ......... Flag WHILE ........ REPEAT
BEGIN ........infinite loop ........ AGAIN
Flag IF ................. ELSE ........... THEN
Each dot stand for one or more valid FORTH words.
LOOP increments Beginvalue by 1 until it is equal to EndValue.
+LOOP increases Beginvalue by StepValue until equal or more than EndValue.
/LOOP similar to +LOOP, but uses unsigned numbers.
UNTIL loops back to BEGIN until Flag (top value on stack) is true (not 0.)
REPEAT loops back to BEGIN as long as Flag is true, if Flag = 0 then it
jumps over the words between WHILE and REPEAT and continues after REPEAT.
IF will process the words between IF and ELSE if Flag is True, else it
will process the words between ELSE and THEN. Then it will continue
after THEN. ELSE is optional, it can be omitted.
Remember the mnemonic: If True Do.
The words EndValue, BeginValue, StepValue and Flag represent numerical
values on the parameter stack. To see what's on the stack type: .s <return>
If the system misbehaves and gives messages 'Invalid Filenumber'
generally after an error, you may recover with typing 'cold' <return>.
To quit, type: bye <return>
This should be enough to get you going.
I recommand that you make a printout of this Readme file and
get hold of a book that explains 'FORTH'. The book
'Starting Forth' by Leo Brodie is recommended.
Acknowledgment: In rewriting the screen editor I used as much as
I could the screens provided on Fred Fish disk #9.
Credit should go to Henry Laxen and Glenn Tenney and others in
most cases. You can blame me for implementing the function keys,
backspace key, del key and control key functions c e f j n p t.
Many control names have been changed, for instance ^z is renamed
to ^q (quit), ^t to ^w (delete word) and ^t is re-used for
transfer to screen 0. Some functions were dropped, others added.
I also added the printer support.
Feel free to change or modify this editor as much as you want
for your own use.
91/05/16 J.Bos
187 Dufferin Ave.
Brantford N3T 4R4
Ontario Canada