PROGRAMMING WITH BASIC

As an example of programming the printer on Microsoft BASIC. we have

listed the program for the IBM-PC. This program runs in the printer’s

Standard mode. and the downloadable condition.

1000
1010
1020
I030
1040
1050
1060
1070
1080
1090
1100
1110
I120
1130
1140
Ii5i)
II (>()
1I70
1180
II 9()
1](]()
]~lo
I~zl)
~~30
1~~o
1250
1260
]~70
1280
1~y[)
13100
1310
1320
I33()
1340
1350
I360
1370
1380
I390
14co
I4I()
[~~o
1430
1440
I4.50
1460
1470
I480
1490
1500
1510
1520
I530
1540
1550
1560
1570
Set control codes
E$=CHR$ (27)Escape code
D$?E$+” x(l Draft qual ity
L$=E$+ x1 “+E$+ kLetter qual ity
RM$=L$+CHR$ (O)Roman character
H$=CHR$ (9)Hori zonta 1tab
PI $=E$+ P“ Pi ca pi tch
Startpr int i ng
~1~T.H---
LPRINT
LPRINT
LPRI NT
LPRINT
LPRINT
LPRINT
LPRINT
I.PRIW
LPRIN’1
I.PRI NT
1>PRINT
I.1’Rrx-r
LPRI?JT
LPRINT
LPFiINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRIXT
1.PRINT
LPR1XT
I.PFiIST
Lk”l’1:,255
ES;D“ ;CHR$ (3);CHR$ (24 ):CHR$ [O)SetHT
L$ :CHR$(O);“Res ident LQ fOnts are :
H$:L$:CHR$ (0) ;“Roman characters. :
H$; L$; CHR$(I) :“Sanserif characters,
H$: L$:CHR$ (2) ;“Courier rhara~tel”s. :
H$;L$ ;CHR$ (3):“Prestige character s,”
H$:L$:cHR$ (4) ;“Script ~hara~ters.
RM$ :“P1rillt pi tclle. al-e:
H$:PI $:“Fic-a pi tch (10 CPI) ,“:
H$:E$ :M“ :“Eli te pitch (12 CPI) ,“
1[$:1?S:F:semi -c[,ndcIIsed [1itch( I 5(’1’I ) :
H$:PI$ :
CHR$(1.5) :Se1e c tcOnd en 5 ecl pr Int
Cundens ed pica p1tch (17 CI’ I) ,
H$:E$ :“!4” :Conrlens ed e1i t epi t ch [20 (’PI) ,:
CHF?$(18)Cane e1conde ns eti I)] iIIt.
H$:E$ ;p 1 :Se1ectprOpc rt i utIa 1sI):+t.z1)s
PI$:Nc)rma1prOp Ort iuna 1,:
H$:C’HR$(15) :Cond ens ed prupo rt i ona 1. :
CHR$( I8):
E$:“PO Canr e1pro pa rt i Ona 1sj)<!c1IIF
H$:E$ :W1:Duut, 1e–he igh t,:E$ :WO”
If$:E,$:“w 1;Donh 1ewidth,;E$ ;“WO
H$:CHR$ (28 );E“ ;CHR$(2):“Trip 1ewidth.:
CHR$(28) ;E“ ;CHR$ [O)
H$:E$:“h” ;CHR$(1):Douh 1e–s ized ,
11$;E$ ;h;CHR$(2):“Quad-s iZed. ;
ES:h;CHR$ (O)
:LPRIh’1’
E$ :“Q:CHR$ (47 )S?trigh treal- g,i11
‘TMS:\:+i i 011s 1itle and [cha rar t6rsp:.1[’ings :
E$ :“a 1
LF’RIXT
I.F’RIXT
LI’R~)iT
LI’RINT
I.I’RINT
1.I’RIN’T
LF’RINT
I.PRINT
LF’RINT
LI’RINT
LPRI NT
F’(IR 1=1TO 7
LPRINT E$ :“.{ :CHR$ ( I ) :
I.PR1XT E$ : :CHR$ ( I ) :
LPRINT THE SPACINGS ARE CHANGED
NEXT I
FOR 1=7 TO 1STEP - I
LpRINT E$ ;A;CHR$ ( I ) ;
LF’RINT E$; ;CHR$ ( I ) ;
LPRINT “THE SPACINGS ARE CHANGED”
NEXT I
LF’RINT ES:aO”
LPRINT E$ ;“3“ :CHR$(30) :
LF’RINT E$ ; ;CHR$ (0) :
LPRINT :LPRINT
LPRINT RM$; “Other features :
(’t>II tertrxt
Line spa cing set
Increas tchara[. trI sI;ice
Linespa cit)g set
Inc reas &chara cti>rspac e
Left just ify
Set[/6” 1ine spa Ling
NrIrma 1character space
136