User`s manual

DOS Support Program
On your demonstration
disk, there may be a program called DOS
SUPPORT.This program, also called a wedge,allowsyou to use many disk
commands more easily (different wedges are used for the VIC 20 and the
Commodore 64). Just LOAD the program and RUN it. It automatically sets
itself up and erases itself when it's finished. You'll have a few hundred less bytes
to work with when this program is running, but you'll also have a handy way to
send the disk commands.
As a result of the DOS Support, the "/" key now takes the place of the
LOAD command. Just hit the slash followed by the program name, and the
program is LOADed. When you use this method, you don't need to use the
LOAD command or the comma 8.
Thc"(Q)"and ">" keys are used to send commands to the disk drive. If you
type (a$ (or >$), the directory of the disk is displayed on the screen, without
LOADinginto your memory! Thesekeysalsotake theplaceof the PRINT#(see
chapter 4) to send commands listed in the next chapter.
To read the error channel of the disk (when the red error light is blinking),
just hit either the (a'or the> and hit RETURN. The complete error messageis
displayed to you: messagenumber, text, and track and block numbers.
4: DISK COMMANDS
OPEN and PRlNT#
Up 'til now, you have explored the simple ways of dealing with the disk
drive. In order to communicate with the disk drive more fully, you have to
touch on the OPEN and PRINT# statements in BASIC(more details of these
commands are available in your VIC 20 or Commodore 64 User's Guide or
Programmer's Reference Guide). You may be familiar with their use with data
files on cassette tape, where the OPEN statement creates the file and the
PRINT# statement fills the file with data. They can be used the same way with
the disk, as you will see in the next chapter. But they can also be used to set up
a command channel. The command channel lets you exchange information
between the computer and the disk drive.
FORMAT FOR THE OPEN STATEMENT:
OPENfile#, device#, (command) channel#, text $
The file# can be any number from I to 255. This number is used
throughout the program to identify which file is being accessed. But numbers
greater than 127 should be avoided, because they cause the PRINT# statement
to generate a linefeed after the return character. These numbers are really meant
to be used with non-standard printers.
14