Commodore CBM Printer 4022 User Manual page 35

Hide thumbs Also See for CBM Printer 4022:
Table of Contents

Advertisement

Example:
10 DfiTfl28>34>65/65.54,34
20 0PEN5>4>5
30 FOR
I
»
1
T06
:
REfiDfl
flt-fi»+CHR»
<
R
>
=
NEXT
40
PRINT#5.fl*
50 0PEN4.4
70
PRINTi4?CHR*<l>CHR*<254)" TCWOMMODORE
.TBMUSINESS
mWRCHINES"
80 NEXT
90 CLOSES
100 CL0SE4
The
following
is
a description
of
the
program
shown
above.
Line No.
20
30
40
50
60-80
Open
5,4,5
AAA
Communicates
to
the
printer
what
function
you want
executed.
A
secondary
address
of
5 indicates that
you want something
stored
in
the
printer's
memory.
-The device
number
(the
printer's).
-The
logical
file
number.
The
FOR NEXT
loop contained
in
this line
reads the data contained
in
line
10
and
constructs
a
string
A$.
A$
contains the necessary information
to print
the
Commodore
logo.
Stores
A$
in
printer
memory.
Opens
the
print
file
for printing.
Prints
the
Commodore
logo
and
"Commodore
Business Machines"
ten times.
PRINT#4
Prints to
the
printer
CHR$(1)
Prints
'enhanced
characters'
CHR$(254)
Prints
the
programmed
character
(the
Commodore
logo)
Cursor
Up
Sets the
printer to
uppercase
Cursor
Down
Sets the
printer to
lowercase
90-100
Closes
the
two
files
opened
by the program.
30

Advertisement

Table of Contents
loading

Table of Contents