I have collected 8 different Forths for the Apple II.
1 is text based and an SBC Forth
1 text based one is an ITC Forth
1 screen based and is an SBC Forth
And the rest are screen based and are ITC Forths.
Not one of the screen based Forths have a screen editor in Forth and only one has one that have to exit Forth to use. The two text based Forths are disk based only and can't access to a hard drive.
The absence of a good editor alone may deter a lot of people to start programming in Forth.
I offer these simple words for editing a line and another for saving a screen, for anyone just starting out in Forth and just want something simple to start entering code.
57B CONSTANT HTAB
: EDLN ( ln -- ) DUP . ." [" SCR @ (LINE) OVER >R TYPE ." ]" 3 HTAB C! R> C/L EXPECT CR ;
: SAVE UPDATE FLUSH ;
Replace the HTAB values for your machine. 3 HTAB should return the cursor 3 positions from the left side of the screen and on the same line that was printed to screen. This should position the cursor just after the "[".
Now it is as simple as doing:
screen# LIST
0-15 EDLN
SAVE
Hopefully anyone seeing how simple editing a line can be will keep newbies from giving up so quick and draw more interest to programming in Forth.
Note: Experienced users can disregard this post
OR, if this does help anyone or any interest, I will post a lot of very simple and small screen editing words that have a lot of power from the command line, and may be quicker than a full blown editor. These editing words include: Cut, Copy, Paste, Insert, Delete, Blank, any line or range of lines. And Copy, one screen or range of screens, from one screen to another.
Due to these words, I have come to prefer editing screens over editing a text file.
Other notes: A Virtual Memory screen file on a hard drive can be as large as the OS allows. On an Apple II with Prodos, this is 16 Mb and offers 32768 screens. Everything from programs to games to a directory to help files can be stored in screens. Maybe this will entice some interest.
May the Forth be with you.