home *** CD-ROM | disk | FTP | other *** search
- Chapter5 L_O_V_E FORTH
-
-
-
- 5.0 Using DOS Commands in LOVE Forth
- --------------------------------
-
-
- L.O.V.E. Forth can invoke the MSDOS command interpreter to perform
- tasks such as deleting files, copying files or displaying the contents of a
- directory, with a simple and flexible DOS command. The DOS command is a
- Forth word in the TOOLBOX vocabulary.
-
- To use the DOS command interactively just type:
-
- DOS
-
- followed by the MSDOS command that is desired and press the
- <return> key.
-
- Example:
-
- DOS dir/w <cr>
-
- will display the contents of the current directory and then
- return to Forth.
-
-
- DOS commands can be embedded in source code screens or in text
- files with the restriction that there be no other Forth words on that line
- after the actual MSDOS command appears. The reason for this is that
- L.O.V.E. Forth passes all the information after the word DOS up to the
- carriage return character, if interpreting from the keyboard or a text
- file, or up to the end of a screen line, if interpreting from a block. Any
- Forth words on the rest of that line will confuse the MSDOS command
- interpreter.
-
- If a programmer desires to remain in the shell of the command
- interpreter for an extended period, the DOS command can be used to invoke a
- new shell by stating:
-
- DOS <cr>
-
- The MSDOS prompt will appear on the display. To return to Forth
- the word "exit" must be typed to exit from the shell.