EasyManua.ls Logo

Commodore VIC-20 - Page 298

Commodore VIC-20
404 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
284 The VIC 20
User
Guide
Once you have opened a file
to
the printer, all you need
to
do to print
to
the printer
is
put
your
data
in a
PRINT#
statement, such as
PRINT#l, "YOUR DATA GOES HERE"
The printer will print
YOUR
DATA
GOES
HERE
CLOSE
Statement
After you have finished accessing a file, whether it
is
to
the printer
or
any other device, you should always close the file.
To
close a file you would
use the following format:
CLOSEjile
number
If
you opened a file with a file number
of
1,
such as
OPEN
1,4
then you would close with
CLOSE
1
CMD
Statement
Everything the VIC outputs will normally be sent
to
the video display.
The video display
is
known as the primary output device.
It
is
possible,
however,
to
change this to some other device, such as the printer, so you can
print listings instead of merely looking
at
them on the screen.
This
is
done with the
CMD
instruction. The format
of
a
CMD
instruc-
tion
is
CMD
device number
Let's instruct the VIC
to
use the printer as the primary
output
device.
First we1l need to
OPEN
a file
to
the printer.
OPEN
1.
4
Then
we
can use the
CMD
instruction as follows:
CMD
1

Other manuals for Commodore VIC-20

Related product manuals