Programming With Basic - Star Micronics LC24-20 User Manual

Multi-font
Table of Contents

Advertisement

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
I 030
1040
1050
1060
1070
1080
1090
1100
1110
I 120
1130
1140
I i 5 i)
I I (> ()
1 I 70
1180
I I 9()
1] (]()
]~lo
I ~zl)
~~30
1~~o
1250
1260
] ~70
1280
1~ y [)
13100
1310
1320
I 3 3()
1340
1350
I 360
1370
1380
I 390
14 c o
I 4 I ()
[ ~~o
1430
1440
I 4.50
1460
1470
I 480
1490
1500
1510
1520
I 530
1540
1550
1560
1570
' Set
control
codes
E$=CHR$ ( 27 )
Escape
code
D$?E$+"
x(l "
Draft
qual i ty
L$=E$+ " x 1 "+E$+ " k "
' Letter
qual
i ty
RM$=L$+CHR$ ( O)
Roman
character
H$=CHR$ ( 9 )
Hori zonta
1 tab
PI $=E$+ " P"
Pi ca
pi tch
S t a r t pr i n t i ng
~1 ~T.H
---
LPR I NT
LPRINT
LPRI NT
LPRINT
LPRINT
LPR INT
LPRINT
I.PR I W
LPR I N'1
I.PRI NT
1>PR I NT
I.1'Rr x-r
LPR I?JT
LPR I NT
LPFiINT
LPR INT
LPRINT
LPR INT
LPR I NT
LPR I XT
1.PR I NT
LPR 1XT
I.PFiI ST
Lk"l'1 : " , 255
ES ; " D" ; CHR$ ( 3 ) ; CHR$ (24 ) : CHR$ [ O)
S e t HT
L$ : CHR$ ( O) ; "Res i dent
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 [,nd c IIs ed [1i t c h ( I 5 ('1'I ) " :
H$ : PI$ :
CHR$ ( 1.5) :
S e 1e c t c Ond e n 5 ecl p r I n t
" Cundens
ed p i ca
p 1t ch
( 17 CI' I ) , "
H$ : E$ : "!4" : " Conrlens
ed e 1 i t e p i t ch
[20
('PI) , " :
CHF?$( 18 )
Cane e 1 conde ns eti I)] i IIt.
H$ : E$ ; " p 1 " :
S e 1e c t p rOpc r t i utIa 1 s I):+ t. z 1)s
P I $ : " Nc)rma 1 prOp Or t i una 1 , " :
H$ : C'HR $ ( 15) : " Cond ens ed prupo r t i ona 1. " :
CHR$ ( I 8 ) :
E$ : "PO "
Canr e 1 pro pa r t i Ona 1 s j)<!c 1IIF
H$ : E$ : "
W
1 " : " Duut, 1e–he i gh t , " : E$ : " WO"
If$ : E,$ : "w 1 " ; " Donh 1e wi d t h , " ; E$ ; "WO"
H$ : CHR$ (28 ) ; " E" ; CHR$ ( 2 ) : "Trip
1e wi d t h . " :
CHR$ (28) ; " E" ; CHR$ [ O)
H$ : E $ : "h" ; CHR$ ( 1 ) : " Douh 1e–s i z ed , "
11$; E$ ; " h " ; CHR$ ( 2 ) :
"Quad-s
i Zed.
" ;
ES : " h " ; CHR$ ( O)
: LPR I h'1'
E$ : "Q " : CHR$ ( 47 )
S ? t r i gh t real- g,i 11
'TM S : " \ :+i i 011s 1 i tle and
[cha rar t 6 r s p:.1 [' i ngs : "
E$ : " a 1 "
LF'RI XT
I.F'RI XT
LI'R ~)iT
LI'R I NT
I.I'R I NT
1.I'RI N'T
LF'RI NT
I. PRINT
LF'RI NT
LI'R I NT
LPRI NT
F'(IR 1= 1 TO 7
LPR I NT E$ : ".{ " : CHR$ ( I ) :
I.PR1 XT E$ : " " : CHR$ ( I ) :
LPR I NT " THE SPACINGS
ARE CHANGED"
NEXT I
FOR 1=7 TO 1 STEP - I
LpR INT 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 t
e
r
t
r
x t
L i ne
spa c i ng s e t
I ncreas
t
chara[.
t r I s I;ice
L i n e spa c i t)g s e t
I nc r eas & c hara c t i>r s pa c e
Left
just
i fy
' Se t
[ /6"
1 i ne
spa
L
i ng
NrIrma 1 character
space
136

Advertisement

Table of Contents
loading

Table of Contents