Printing In The Direct Mode Ig - Commodore MPS-803 User Manual

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

Advertisement

run
HItf3
Reyerse
off
Reverse
off
Reverse
off
Reverse
off
ITS R c- '--■' & " s =5
o +■ f
4.
Selecting Character Mode In Local
CHRS(17)/CHRS(145)
Secondary addresses 0 and 7 set a character mode in global {SA=0: Graphic
Mode, SA=7: Business Mode}, where as control codes CHR$(17} [cursor down]
and CHRSI145} [cursor up] set a character mode in local ... CHRS(17):
Business Mode, CHRSH45}: Graphic Mode. Through these two control codes,
the printer can produce two kinds of character set, both in graphic mode and in
business mode, mixed on one line, that cannot show on screen.
CHRSC17} functions until CHR$(145) or carriage return is detected.
CHRS(145) functions until CHRSU7] or carriage return is detected.
EXAMPLE 1:
1 00
110
129
:l, 30
140
i 50
170
I 90
210
£20
230
240
230
2SB
270
2B&
REM CHR$< 17>
, . . I. OCflL
c>: -Sl\ -'^SS
MODE
REM
CHR*';i45J . . - LC1CRL
GRRPHIC
MODE
CD*=CHR* <. I?> : CU*=CHR$ C 14^5^
OPEN
^,4,7
REM
PRINT
IN BUSINESS MOD!
PRINTS?, iT;U$- "4
";cnt: "SPRCE"
PRIMT#7..CL!^: "9
";CD*: "HERRT"
PR J NT#7, CU* ■ " +
" -: CB'f : "01 flMOMD "
PRINT#7,CU$J "*
":CO*;"C! UB"
=7= PRIHT#7
OPEN 4,4.fi
REtn
PRINT
IN
GRflPHIC
N:.iOE
PRINT*-) , CD* J "SPfiDE
" ; CU*; "♦"
PRINT#4, Cff^J "HEflRT
" J CUf ■ "»"
PR I NT#4 , CD* i " 01RMOND
" .• CU*.- " ♦ "
PRjMT#4 , CD*; "CLUB
" :CU*J "■r-"
PRIKT#4<PRJNT#4
CL0SE4
;300
OPEN
310
FOR
3^:©
close;
— 1
Tf
!
t— 1 r >
OPEN 4,4, 7
PRINTtF4, "HELLO THERE" not
CMD4,"HELLO THERE"
PRINT#4
CLOSE 4
OPEN 4,4r 7
PRINT#4, "HELLO THERE"
CMD 4, "HELLO THERE"
CLOSE 4
Armed with these thumbnail descriptions of what the printer related commands
do, you can now proceed to the next part of this chapter, which tells ydu how
to use these commands to control your printer.
C.
Printing In The Direct Mode
Now that you have reviewed the BASIC commands you will need to handle files
directed to your Printer, let's put them to use in some practical applications, The
direct mode allows you to communicate with your printer by entering printing
commands directly into your computer via the keyboard and having them ex
ecuted immediately.
The following example illustrates the DIRECT mode procedure for listing a
short BASIC program. In the example below, a single statement BASIC program
is keyed into the computer's memory. A LIST command is keyed and the pro
gram is printed on your video monitor. A file (#3| is OPENed tD your Printer. A
CMD 3 is issued to the file open on your Printer tit is now listening!. Issue the
LIST command again. This time the output will be sent to your Printer. Td
unlisten
the Printer,
you
instruct the computer to print a null character to
file #3. Now you can CLOSE file#3, freeing up that file number for some other
use. AH output will now appear an the vidno monitor.
You Type:
The screen displays:
The Printer prints:
70 PRINT'TEST"
LIST
OPEN 3, 4
CMD3
i 1ST
PRINT#3
CL0SE3
10 PRINT-TEST"
LIST
10 PRINT'TEST"
OPEN 3,4
READY.
CMD3
LIST
PRINT#3
READY.
CL0SE3
READY.
READY.
lOPRINT'TEST"
READY,
19

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents