V-Forth does not implement the traditional Forth block-oriented words
or the editor vocabulary. These words were used when programs were
developed on hosts without any standard storage methods. Today most
program development is done using text editors on systems where tools
such as revision control are available.

Instead of using blocks V-Forth can access files on a tape or disk
device in one of two forms: source or dictionary.

Source files can be read in and interpreted from a SEQ file (disk) or
data file (tape). There is no method of decompiling back into a source
file.

Complete dictionaries can be saved and loaded as either PRG files
(disk) or program files (tape).


High-Level Words
----------------

DLOAD   ( -- )

Used in the form
          DLOAD filename
Loads the previously saved dictionary from the named file on the
current device, replacing all other words that are not stored in
ROM. If an autostart word was defined when the file was saved it will
be executed upon successful loading. (See SAVED)

DSAVE   ( -- )
Used in the form
          DSAVE filename
Saves the current RAM-based dictionary to the named file on the
current device.

INCLUDE   ( -- )

Used in the form
          INCLUDE filename
Opens the named file on the current device, reads each line and passes
it to the interpreter. Words are executed or compiled as if they were
typed on the keyboard.

INCLUDE?   ( -- )

Used in the form
          INCLUDE? word filename
Conditionally include the contents of a file if a word is undefined
          (see INCLUDE).


Low-Level Words
---------------

The following words provide the primitives for reading from and
writing to files and devices. They return serr, a combination of the
KERNAL return value and the STATUS flags.

OPEN-FILE   ( addr count sa  --  lfn serr )

Open a new logical file handle on device DEVICE# named by the string
pointed to by addr. If no secondary address is required the value 255
should be used.

CLOSE-FILE   ( lfn  --  serr )

Close a previously opened logical file handle.

READ-FILE   ( addr count1 lfn  --  count2 serr )

Read up to count1 bytes from a logical file handle. Returns the actual
number of bytes read as count2.

READ-LINE   ( addr count lfn  --  serr )

Read up to count bytes, or until a CR which ever comes first. The
length of the line read is stored in the byte pointed to by addr.

WRITE-FILE   ( addr count lfn  --  serr )

Write count bytes to a logical file handle.

WRITE-LINE   ( addr count lfn  --  serr )

Write count bytes followed by a CR to a logical file handle.

NEXTLFN   ( -- lfn )

Return an unused logical file number.

NEXTSA   ( da  --  sa )

Return an unused secondary address for device da.

?IOERR   ( serr  -- )

Test serr and print a descriptive representation of any
errors. Terminate the current word and return to the interpreter.
