\ SIGNATURE 08DEC84JAPThese tools were compiled (collected from friends) as well as written by my self. They are presented in the hopes of being the start of a collection of high level Forth code that will be edited and distributed on disk by the Forth Interest Groups. Let's Talk Forth John A. Peters 121 Santa Rosa Ave. San Francisco, CA 94112 Phone (415) 239-5393 8-9 am or after 7 pm or Computer Language Mag. BBS 957-9370 I am interested in collecting and exchanging F-83 code. \ HELP FILE 01dec84jap31 VIEWS HELP.BLK title end-help CR .( LOADING HELP FILE ) CR 2 4 thru : HELPER ( -- ) [compile] RECURSIVE LAST @ NAME> [compile] LITERAL Compile ((VIEW)) Compile CR Compile READ ; Immediate VOCABULARY HELP HELP DEFINITIONS 5 15 THRU FORTH DEFINITIONS title HELP-Screens : H dark \ 01DEC84JAPCR ." Introducing FORTH. In order to look at standard 64 " CR ." column Forth, you will need to type following commands, " CR ." and execute each with a CR. Rember H to return here." CR CR ." DIR Directory of disk. See also B: DIR" CR ." D Directory of disk with lengths in K (slower)" CR CR ." {FILENAME.BLK} Opens the file (Closes previous file)" CR ." Use OPEN {FILENAME.BLK} the first time, or on error." CR CR ." IND Index of all screens in the file." CR CR ." 0 ETC List each screen. Pre buffers next screen." CR ." Space=Next, Q=quit. BEST WAY TO PROOF A FILE." CR CR ." HELP WORDS Give a list of more HELP words." CR CR ." Note: All of Forth is here, inc. the Multi-tasker!" CR ." Call for more tutorials. I enjoyed making this one." CR ." Type HELLO for my phone number. JP " CR CR ." P.S. if a command dosen't work, try it a second time." ; \ HELP 2 30nov84jap: HH ( -- ) CR ." The space bar usually starts/stops the screen output." CR ." Don't type the {curley brackets}" CR CR ." WORDS List the Forth words in the current voc." CR ." VOCS List the additional vocabularys of words." CR ." ORDER Give the vocabulary search order." CR CR ." HELP WORDS List the words in the help vocabulary." CR ." EDITOR-COMMANDS Requires the file HELP.BLK on line." CR CR ." VIEW {word} List the source screen for {word}." CR CR ." DOCUMENT {word} List source. Tells file needed." CR CR ." SEE word Recreate psudo source from memory (decompile)" CR CR ." FILE? Give the name of the file currently open." CR ." n LIST List screen number n on the console. " CR ; \ HELLO to the new user. 08DEC84JAP: HELLO CR ." 8080 Forth 83 Model " ( .VERSION ) ." 2.1.1" CR ." Released on April 1, 1983" cr ." No Visible Support Software" cr ." Box 1344, 2000 Center Street" cr ." Berkeley, California 94704" cr CR ." Tools-Mods by John A. Peters" CR ." (415) 239-5393 Let's talk Forth" CR ." Latest compilation was November 30, 1984" CR CR ." Type H for instructions." cr ." Have Fun and give me feed back please. J.P." cr EMPTY-BUFFERS ONLY FORTH ALSO DEFINITIONS DEFAULT ; ' HELLO IS BOOT : VISUAL-ED HELPER ; \s 30nov84japEDITOR The voc containing the ediltor words. ( Don't use ) NEW Entry mode. Two cr to exit. Flush to save. ED The FIG line editor. List or L to see results. Use it to install the higher editors if necessary. VED Visually edit the current screen. Cursor around. VEDIT ( n -- ) Edit screen n Currently there is a bug in my customizaton of Visual. To use it I usually get to the screen I want to edit. Then I hit ED once then CTL-V (cr) and CTL-V (cr). That is two times in a row. The first time puts you in to the visual editor vocabulary and the second one activates the cursor on the screenCursor around. Ctl-V toggles between isert and over write modes.DONE writes it to disk ( also ctl-W ) JP : CTRL-KEY helper ; \s 30NOV84JAPThese are CONTROLL commands for the full screen editor. a - alternate between code and shadow screens b - edit previous screen c - execute ABORT b - backspace i - tab j - newline k - up one line m - ret n - edit next screen p - printer toggle switch u - undo or cancel current command line v - toggle between insert/replace mode (force visual mode) w - write the screen to disk x - X out (cancel) the current command lilne : LINE-ED-2 helper ; \s 01dec84jap represents the text following the command. If is null, the contents of the find buffer are used. F finds the text and leaves the cursor just past it. n S searches for the text thru all screens from the current up to n. Each time a match is found, n remains on the stack until screen n is reached. E erases the text just found with F or S. D finds and deletes the text. R replaces the text just found with or with the insert buffer. TILL deletes all text on the line from the cursor up to and including . J deletes up to, but not including, . 'Justify' KT puts all text between the cursor and inclusive into the insert buffer. 'Keep-Till' : LINE-ED-1 helper ; \s 01dec84jap represents the text following the command. If is null, the contents of the insert buffer are used. I inserts text on the current line at the cursor. O overwrites text on the current line. P replaces the current line with and blanks. U inserts a line under the current line. X deletes the current line and puts it into the insert buffer. SPLIT breaks the current line in two at the cursor. JOIN puts a copy of the next line after the cursor. WIPE clears the screen to blanks. M has been neutralized. It moved a copy of the current line to some other screen. The editor should not affect other screens.G gets a line from another screen, and inserts it in front of the current line. BRING gets several lines. : TERMINAL helper ; \s 30NOV84JAP Provided that your terminal supports the four routines AT, DARK, BLOT, and -LINE, this code will give a continuous display of the screen being edited. The display is updated automaticallyas each command line finishes ( just before 'OK' is typed ). ***NOTE*** Assumes 24 line 80 column display. This version is installed for the KayPro2 which is an ADM-3a terminal. If your's is different the above four words will needto be redefined. I'll help if I can. John A. Peters dba Aries Electric CO. SF : SCREEN-MOVE helper ; \s 30NOV84JAPCONVEY Transfer screens. BRING Transfer a group of lines. G Get a line. All of the above work with in the same file or between files. They transfer text from the FROM file into the OPEN file. i.e. for example the help on screen ( ) was copied via: OPEN HELP.BLK FROM B:VISUAL.BLK 14 14 TO 6 CONVEY The first 14 is the starting source screen and the second one isthe ending source screen. (I only wanted one) The 6 is the target screen that I moved it to. from thru TO target (one-of-the-above-commands) COPY is simple ( from to -- ) : CRASH helper ; \s 30NOV84JAPNo file is OPEN when called by a Forth word. Try DONE CMOVE over writes an area of memory that is needed. REBOOT Use ! (store) to write to the wrong area of memory REBOOT No OK Try a ; maybe it was left of a screen. ." and " must be in pairs ditto for : and ; also R> and >R OPEN with out a file name = crash. REBOOT DECIMAL You might be in the wrong base. Type DECIMAL SAVE-SYSTEM without a file name or without enough disk space.^ : CREATE-FILE helper ; \s 01dec84japTo create a new file use the D command to see how much space is left on the disk. then decide how many block you want. Half of the screens will usually be used for the shadow screens so mayby you should double your estimate. It is nice touse multiples of 6 since that number will be printed on each page. Say you want 18 screens to work with and you want to call it WORK.BLK The following command will do it for you. 36 CREATE-FILE WORK.BLK If you have loaded my TOOLS.BLK you can use the alias C-F I also use E-B for empty-buffers.^ JP : SAVE-SYSTEM helper ; \s 30NOV84JAP When you have addeds several extentons to the system you will want to save the system to a new file name, so that when you boot up all your new words will be persent in the dictonary. SAVE-SYSTEM FILENAM.COM or S-S FILENAME.COM You must use the extender .COM because the disk operation systemrecognises that as an indicator for a bootable file. The file name can be any thing from one to eight characters.^ : DUMP helper ; \s 30NOV84JAP : MODEM helper ; \s 01dec84jap T -- Enter the terminal mode loop. Now you are connected to the system at the other end (Forth, BBS, etc.). Press 'ESC' to return to your Forth. CHAT -- Use when in terminal mode to communicate with the operator on the other end. (Puts his system into : VIEW ( -- ) (VIEW) DUP SCR ! dark LIST ; .( EDITS instead of Listing watch it!! ) : meta-comp helper ; \s 04DEC84JAPA= KERNEL80.BLK B=META80.BLK F83.BLK ans some free space. A>B:F83 If you changed disks do a DOS RESET OPEN B:META80.BLK OK Creates KERNEL.COM on B drive 12K Leave disk in B put EXTEND80.BLK in A BYE does a warm boot A>B:KERNEL EXTEND80.BLK START OK Creates F83.COM 24K on B : UPDATES-2.1.1 message ; \s 06dec84japFile Scr Lin KERNEL80 76 256 was 4096 UTILITY 7 9 255 was 4095 UTILITY 7 9 256 was 4096 EXTEND80 2 Hello 2.1.1 was 2.1.0 META80 10 9 256 was 4096 CPU8080 1 Add Title xxx 4 times UTILITY 1 Add Title xxx 10 times META80 1 Remove the Cr from NLOAD EXTEND80 12 1 256 allot was 32 allot EXTEND80 1 5 Title xxx EXTEND80 1 6 Ttile xxx KERNEL80 1 11 Change A: to B: KERNEL80 84 6 Kill the line CR HERE xxx ." Pages"