Assigning T Hechamcter D Ata; Sample Program - Star Micronics LC-20 User Manual

Dot matrix printer
Table of Contents

Advertisement

Assigningthe characterdata
Now,we calculatetheverticalnumericalvaluesof thecolumnsof dots,and
enterthemunderneaththe grid.For example,lookingat Figure5-3, we see
thatintheleft-mostcolumntherearefivedots,andtheyaresittinginthe"64"
box,"32''box, " 16"twx,"8"box,and"4"box.Thusitsverticalvalueis 124.
In the next column,there is no dot straddlingthe verticalline; its value is
nxorded as O.
You will see the lettersml, nd, m3,etc., are aboveyourvalues.Whenyou
definethe character,you will substituteyourvaluefor eachof theseletters.
Samp/eprogram
To demonstratehow to use the downloadcharacters,let's use the "car"
characterandsomeotheruser-definedcharactersto printa smallgraph.This
programwill do just that:
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
LPRINT CHR$( 27) ; "A" ; CHR$( O) ;
LPRIN"r CHR$(60) ; CHR$( 62 ) ;
FOR N=60 TO 62
FOR M=O TO 11
READ MM
LPRINT CHR$(MM);
NEXT M
NEXT N
LPRINT
;:);
139,
2,
5,
8, 241,
0
0,241,
8,
5,
2,
0
DATA 139, 124,
0, 66,
4,
64
DATA 36,
16,
2,
16,
12,
()
DATA 139,
46,
16,
2,
60,
0
DATA 48,
0, 48,
0, 48,
0
LPRINT CHR$(27) ; '( D:4JCHR$( 11 ) ; CHR$( O) ;
LPRINT CHR$( 27 ) j "h" j CHR$( 1 ) ;
LPRINT "
U . S . EXPORTS"
LPRINT CHR$( 27 ) j "h" 1CHR$( OJ ;
LPRINT CHR$(27) : "%" ; CHR$( 1 ) ;
LPRINT "AUTOS" ; CHR$( 9 ) j
FOR I=. 4 TO 9.3
STEP .4
LPRINT CHR$(61) ;
NEXT I
LPRINT
72

Advertisement

Table of Contents
loading

Table of Contents