home *** CD-ROM | disk | FTP | other *** search
- Chapter9 L.O.V.E. FORTH
-
-
-
-
- 9.0 Working In L.O.V.E. Forth
- -------------------------
-
- Here are some notes on how to do day-to-day work in L.O.V.E.
- Forth. A good starting point for viewing the features is given in the
- shareware demo LOVES.EXE .
-
-
- 9.1 Help
- ----
-
- For help while using the system, load the Hyper Helper with the DOS
- command: HM LOVE before running Forth. Or execute GO.BAT or
- MIN.BAT . The help system is subsequently invoked with the key sequence:
- HELP or HELP forth word, eg help loop .
-
-
- 9.2 Directories
- -----------
-
- Usually, the programmer copies Forth to the working directory,
- including source code etc. When copying the EXE to another directory, be
- sure to also copy the *.VTR files. These are the virtual vocabularies.
- Alternatively, the DOS APPEND command can be used to direct DOS to
- the appropriate directory.
-
-
- 9.3 Versions of L.O.V.E. Forth
- --------------------------
-
- The minimum system, with the smallest number of features compiled
- is called MINnnn.EXE, where nnn is the version number (eg. MIN129.EXE ).
- This is the program executed by MIN.BAT . On top of this can be the
- block disk words (LOADBLK.TXT) and / or the RPN assembler. Be sure to
- save the system again with SAVE" after loading the desired features
- (eg. SAVE" LOVERPN.EXE" ).
-
- Various source code modules can be loaded on top of the minimum
- system. These include local variables, multiple CFA words,
- miscellaneous words. Dependancies:
-
- LOADBLK.TXT also loads MISC.TXT
- ARRAY.TXT requires MCFA.TXT
-
- All others can be loaded independently.
-
-
- 9.4 Upper and Lower Case
- --------------------
-
- Normally, the case of a word is ignored. By setting variable
- CASEMATCH to true, however, will cause L.O.V.E. Forth to match the case
- of the word as it originally was compiled. All the L.O.V.E. Forth standard
- words were compiled in upper case. Compilation is slightly faster in case
- match mode, but it is usually desireable to type interactive commands with
- case ignored.
-
-
-
- 9.5 Text strings
- ------------
-
- Frequently the programmer requires control characters in strings.
- This is difficult to do in any text file, as control characters may be
- editor commands, or printer control codes. L.O.V.E. Forth supports AWK
- style escape commands. These are summarized as follows:
-
- \b : backspace
- \f : formfeed
- \n : newline, linefeed
- \r : carriage return
- \t : tab
- \ddd : decimal value, 1 to 3 digits
- \c : where 'c' is any other character literally
- \\ : for backslash
- \" : for "
-
- These can be used in text strings compiled with the words:
- ." " ," .(
-
-
- 9.6 Vocabularies
- ------------
-
- See also the section describing vocabularies. The usual vocabulary
- for working in Forth is FORTH. The words controlling the dictionary search
- order are in vocabulary ROOT . The word DEVELOP sets the search order
- to be ROOT FORTH and TOOLBOX which contains programming aids.
- The vocabulary implementation is that of a stack, ALSO pushes the stack
- and VDROP drops the top of the stack. ONLY resets it to ROOT only.
-
-
-
- 9.7 Access to DOS
- -------------
-
- Typing the word DOS followed by a DOS command line, executes that
- in a DOS shell. Typing DOS followed by nothing, enters the DOS shell
- (typing EXIT returns to Forth). This is one way to invoke a text editor.
- Note that there must be enough memory to invoke DOS. If too much memory is
- allocated in MAXHEAP (see instructions on saving the system), DOS
- cannot be entered.
-
-
-
- 9.8 Windows 3.0/3.1
- ---------------
-
- The multitasking features of this environment are useful. One can
- run L.O.V.E. Forth from a DOS prompt, and have an editor running in another
- window. The L.O.V.E. Forth icon is provided.