Star Micronics LC-20 user manual Assigningthe characterdata, Samp/eprogram

Models: LC-20

1 130
Download 130 pages 19.05 Kb
Page 80
Image 80

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 LPRINT CHR$ ( 27) ; “A” ; CHR$ ( O) ;

210 LPRIN”r CHR$(60) ; CHR$( 62 ) ; 220 FOR N=60 TO 62

230 FOR M=O TO 11

240 READ MM

250 LPRINT CHR$ (MM);

260 NEXT M

270 NEXT N

280 LPRINT

290 ;:); 139, 2, 5, 8, 241, 0

300 0,241, 8, 5, 2, 0

310 DATA 139, 124, 0, 66, 4, 64

320 DATA 36, 16, 2, 16, 12, ()

330 DATA 139, 46, 16, 2, 60, 0

340 DATA 48, 0, 48, 0, 48, 0

350 LPRINT CHR$ (27) ; ‘(D:4JCHR$ ( 11 ) ; CHR$( O) ; 360 LPRINT CHR$ ( 27 ) j “h” j CHR$ ( 1 ) ;

370 LPRINT “ U . S . EXPORTS”

380 LPRINT CHR$ ( 27 ) j “h” 1CHR$ ( OJ ;

390 LPRINT CHR$ (27) : “%” ; CHR$ ( 1 ) ;

400 LPRINT “AUTOS“ ; CHR$( 9 ) j 410 FOR I=. 4 TO 9.3 STEP .4

420 LPRINT CHR$ (61) ;

430 NEXT I

440 LPRINT

72

Page 80
Image 80
Star Micronics LC-20 user manual Assigningthe characterdata, Samp/eprogram