Star Micronics LC-15 user manual Assigningthe characterdata, Sampleprogram

Models: LC-15

1 130
Download 130 pages 48.71 Kb
Page 81
Image 81

Assigningthe characterdata

Now,wecalculatetheverticalnumericalvaluesof thecolumnsof dots,and enterthemunderneaththe grid. For example,lookingat Figwe 5-3, we see thatintheleft-mostcolumntherearefivedots,andtheyaresittingin the“64” box,“32’’box,“16”box,“8”box,and“4”box.Thusitsverticalvalueis 124. In the next column,there is no dot straddlingthe verticalline; its value is recordedas O.

You will see the lettersml, m2,m3,etc., are aboveyourvalues.Whenyou definethe character,you willsubstituteyourvaluefor eachof theseletters.

Sampleprogram

To demonstratehow to use the downloadcharacters,let’s use the “car” characterandsomeotheruser-definedcharactersto printa smallgraph.This programwill do just that:

1000 LPRINT CHR$ (27’) j “&”; CHR$ (0) j 1010 LPRINT CHR$ ( 60 ) ; CHR$ ( 62 ) j 1020 FOR N=60 TO 62

1030 FOR M=O TO 11

1040 READ MM

1050 LPRINT CHR$ (NM) :

1060 NEXT M

1070 NEXT N

1080 LPRINT

1090 DATA 139, 2, 5, 8,241, 0

1100 DATA 0,241, 8, 5, 2, 0

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

1120 DATA 36, 16, 2, 16, 12, 0

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

1140 DATA 48, 0, 48, 0, 48, 0

1150 LPRINT CHR$ ( 27) ; “D” j CHR$ ( 11 ) J CHR$ (0 ) J 1160 LPRINT CHR$ ( 27) ; “h”; CHR$ ( 1 ) j

1170 LPRINT “ U . S . EXPORTS”

1180 LPRINT CHR$ ( 27) ; “h”; CHR$ ( 0) j 1190 LPRINT CHR$ (27) ; “%”; CHR$ ( 1 ) j 1200 LPRINT “AUTOS” ; CHR$ ( 9) ;

1210 FOR I= .4 TO 9.3 STEP .4

1220 LPRINT CHR$ ( 61 ) ;

1230 NEXT I

1240 LPRINT

Page 81
Image 81
Star Micronics LC-15 user manual Assigningthe characterdata, Sampleprogram