Printing Under Program Control; Secondary Address Ni - Commodore MPS-803 User Manual

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

Advertisement

170
180
190
200
21S
22G
24Q
250
read a ■
a* < i > =&$ •;
next,
.i
r&.id
b*-b*<i^=lef
next
i
", i l >
■for
K=i
Ft int#7.
Print*?.
Print#?,
Print*7
to
t« £■ '
260
next
k
".; hi
230 for
1 = 1
to Si Print*?'next
1
300
319
32d
33S
340
350
36S
378
38@
39@
40Ci
410
420
430
end
data
data
data
data
data
data
data
data
da t ft
data
130,
189 j
156,
lie..
255 ■
214,
132>
1 43 ,
i 64,
20 1 ,
129.. 254.. 129* 130, 123, "Rr-ies"
194,134,194,1S3,12&,"Taurus
221 ,
154,
148,
Gemini"
129,
217,
129,
1 S8 ■
240,
200..
193,193,221,227,
136, 192,216, 134, 1'C.inc*r1
142, 123.. 13y, 132, "Le-o"
254, 193,254,- 152,
133,217,214,128,
254, 129 , 254.. 134,
144, 170, 154.. 142.
143,194,138j14G,
164,20S, 164, 12S,
Io^r
^ -~f,^~"
h !i>i^i
-"■■% -*
ii- i""i -
ii
"Vir3o"
' ScorPio"
•Sagittarius"
'CaPricornus"
RUN
ftv-i '■■■
Taurus
Gemi ni
C:.5rirji=t-
Leo
ycofp i o
S a 9 i t t--j r
P i t
3.
Reverse ON/OFF CHRS(18)/CHRS(146}
By sending the code [CHRSMBJ] to your printer, vOu have turned on the
REVERSE FIELD mode. This prints white letters on a black background. By
sending the code [CHRS(146>] to your printer turns off the REVERSE FIELD
mode.
32
D. Printing Under Program Control
You have seen how to print a listing of a simple BASIC program directty from
the keyboard. Although it is not good programming practice, the following ex
ample shows how to prim a listing of a BASIC program under control of the pro
gram itself. First, enter the following simple program into your computer's
memory:
10 OPEN 3, 4
20CMD3
30 PRINT "PROGRAM CONTROL"
40 UST
H you typed List on your keyboard, the program you just entered would be
listed on your video monitor. Enter the RUN command. The following should
be printed on your Printer:
PROGRAM CONTROL
10 OPEN 3,4
20CMD3
30 PRINT "PROGRAM CONTROL"
40 LIST
READY.
Now, entef the following
PRINTS
(UnHsten the channel)
CLOSE3
(Close the channel)
The RUN command instructed the computer tD execute the program in its
memory. First, file#3 (device#4) was opened. Next, the CMD command instruc
ted the computer to direct ail subsequent output to file#3. The program then
PRINTed PROGRAM CONTROL on file ^. The LIST commar>d instructed the
computer to print a listing of the program in its memory on
REMEMBER - when using the LIST command within a program, you must
type the PRINTS Ifn command to unlisten the printer Then you must type
in the CLOSE Ifn command to cfose the file. Both of these commands can be
entered into the program or after you have RUN the Program. Using the LIST
command or the CMD command in a program fs generally not a good program
ming practice. It is suggested that you only use them in DIRECT mode.
E,
Secondary Address
Earlier in this guide, you were introduced to the secondary address concept in
the discussion of the OPEN statement. This unique feature allows you to in
struct your new Printer to do following operations:
21

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents