Commands; Printing Under Program Control - Commodore VIC-1525 User Manual

Graphic printer
Hide thumbs Also See for VIC-1525:
Table of Contents

Advertisement

3.
Printing
Under Program
Control
Now
that
you
have
seen
how
to
control the
printer directly
from
the
keyboard,
it's
time
to
control
the printer
from
within
a
BASIC
program.
The
short
BASIC
example below would
already be
in
the
computer's
memory.
It
could have been placed
there
from
the
keyboard,
a cassette
tape,
or
a
floppy
disk.
10
0PEN3,4
20
CMD3
36
PREPROGRAM
CONTROL"
40 LIST
3.2
The
RUN
command
is
given
and
the
resulting
printout
is
shown
here:
PROGRAM CONTROL
10
0PEN3,4
20 CMD3
30 PRINT"PR00RflM CONTROL"
40
LIST
RERDV.
3.3
REMEMBER
THIS!
When
using the
LIST
command
within
a
program
execution,
you
must
type
the
PRINT#
command
to
close
the channel.
Then
type
the
CLOSE
command
to close
the
file
after
you
have
finished
RUNning
the
file.
Although
this
works,
it
is
NOT
good programming
practice.
It
is
sug-
gested
that
you
only
use the
CMD
command
and
DIRECT
mode.
4.
Printing
Modes
and
Control
Codes
You
can
also
use
your
printer
and
the
PRINT#,
CMD
and
PRINT
commands
in
conjunction with
CHR$
codes
to
do
the following:
DESCRIPTION
INPUT
CODE
Enter Graphic
Mode
CHR$(8)
Line
Feed
After
Printing
CHR$(10)
Carriage
Return
CHR$(13)
Enter
Double Width
Character
Mode
CHR$(14)
Enter Standard Character
Mode
CHR$(15)
Tab
Setting the Print
Head
CHR$(16)
Enter Cursor
Down
Mode
CHR$(17)
19.

Advertisement

Table of Contents
loading

Table of Contents