Chapter 2: Using Your Printer; Introduction; Basic Commands Associated With Your Printer Fg; The Open Command - Commodore MPS-803 User Manual

Dot matrix printer
Hide thumbs Also See for MPS-803:
Table of Contents

Advertisement

CHAPTER 2
USING YOUR PRINTER
A.
Introduction:
Now that you have learned how to install the ribbon cassette and paper into
your new Printer, how to connect it to your computer, how to test it and how
to solve any problems that may occur, you are ready for the next step — Putting
the MPS-803 Printer to work with you.
In this chapter, you will see how to use your Printer to print program listing,
program results, and graphic displays. Before we go any further, make sure that
you aro able to do the following:
1.
Operate your COMMODORE computer.
2.
Write elementary programs in BASIC language.
3.
OPEN and CLOSE files.
4.
Read and write files to various peripheral devices: {Like a DATASSETTE™
recorder or COMMODORE Floppy Disk Drive for the purpose of saving/
retrieving programs keyed
in as you continue through the rest of this
manual.)
If you are not familiar with any of the above items, take the time now to read
and understand USER'S GUIDE and PROGRAMMER'S REFERENCE GUIDE.
B.
Basic Commands Associated With Your Printer
1.
The OPEN Command:
This command creates a linkage or correspondence between a given physical
device and a file number. Its format is as follows:
OPEN
Ifn.dn.sa
where:
Ifn
dn
Is the fogical file number (any number from 1 to 255). If the logical
file number is greater than
127, any printed
lines will be double
spaced.
Is the device number of the peripheral that will be sending/receiving
the file. Foi the remainder of this manual you will be using =4, the
address oi your Printer. (Since that is the number assigned to it at the
factory.)
21 &
FOR
J~i
TO
S:PRINT#4-*NEXT
J
220
CLOSER.
RUN
O1234567S9QI2345673901234S6?390123456789
COriMODORE
R-R I NTER
6.
Repeat Bit Image Printing
CHR<8}
CHRS(26);CHR$(n);CHRS{Bit Image Data)
This codes sequence specifies the repeated printing of bit image data, "n" is a
binary
number (0 through 255} which specifies the desired number of the
printed repetition; followed by one-byte bit fmage data to be printing repeat
edly.
When 0 is specified for "n", it is read as 256. fn order to repeat more than 256
times the operator needs to use this code twice.
EXAMPLE:
l&B F?EM REPETITION OF BIT
PflTTERN
116 OPEN 4,4
=REM PRINT
FN GRfiPHIC MODE
120 B3*=CHR*<S) : SUB$=CHR$t26:> =DE$-CHR*< 155
130
FOR1
l*t
TO
£
14S
REHO
N
15tf PPJ NT#4, £'S£; SUP* ; CHP* C N > i CHR$ '-. 24 3 '■' :■ DES
i etn
next
j
170
180
FOR
J-l
TO
B:FRINT#4iNEXT
J
190
CL0SE4
2S0
210
DRTR 34,57. 75- S9.. 123^ 1SS
RUN
I.inrura i "1-
37

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents