OPEN
99,
4
CMD
99, "HELLO VIC"
PRINT#
99; CLOSE 99
OPEN
2,4
PRINT#2, CHR$(124).
123,63,76
CMD
2
PRINT#
2
CLOSE 2
2.
Printing in the Direct Mode
Now
that
you have gone through the various printing commands and what
they do, let's put
them
to
use
in practical applications. The DIRECT mode
allows
you
to communicate with
your
printer by entering printing com-
mands DIRECTly from the keyboard
of
your
computer.
The following example illustrates the entire DIRECT mode listing process
in a short BASIC program. In this example, a file containing a single
BASIC statement
is
typed into the computer's memory. The file
is
then
OPENed. The
output
channel to the printer
is
opened and the printer
is
"listening" using the
CMD
command. The file
is
LISTed. The
output
channel is closed using the
PRINT#
command. Finally the file
is
CLOSEd.
The printer
is
now
out
of
use and the
computer
is
ready to accept new
commands.
You type:
I)
10?"TEST"
(2/
OPEN3/4
..
~
CMD3
(4
LIST
(~)
PRINT*3
.6)
CLOSE3
20.
The screen displays:
10?"TEST"
OPEN3/4
RERDY.
CMD3
LIST
PRINT*3
CLOSE3
READY.
The
printer
prints:
READY.
10
PRINT"TEST"
RERDY.
3.1