Star Micronics LC-15 user manual How theprogram works

Models: LC-15

1 130
Download 130 pages 48.71 Kb
Page 95
Image 95

How theprogram works

Thisprogrambeginsby assigninga numberof printercommandsto BASIC stringvariables(lines 1000to 1090).Youcanfindmostof thesecommands near the beginningof chapter4.

The WIDTH“LPT1:”255statementin line 1110meansinfhite line width. It preventsthe IBM-PCfrom insertingunwantedcarriagereturnsand line feeds in graphicsdata.

Actualprintingbeginsin line 1120.Usingthe preassignedcommands,the programprintssamplesof its differentfontstyles,includinga line showing all styles in italics, followedby samples of the print pitches, then some doubleand quadruple-sizedprinting.

Next comes the central attractionof the program: a line of text printed fourteentimesin expandingandcontractingloopsto giveabarreleffect.The workis doneby fourprintercommands:a commandsettingtherightmargin (line 1400);a centeringcommand(line 1420);a commandto vary the line spacing(lines 1440and 1490);and a commandto micro-adjustthe space betweencharacters(lines 1450and 1500).

Nexttheprogramreturnstonormalspacingandgivesa demonstrationofthe printer’sword-processingabilities:bold printing,underlining,subscripts, etc.

The row of automobilesin the nextprintedline is createdby downloading two new characterpatterns,whichare printedin placeof the character“<” (character60). Detailscan be foundin Chapter5.

The finalpart of the programuses dot graphicsto print some “SW”logos withvariousdensities.The dotpatternof thelogowasoriginallylaidouton graphpaper,then convertedto the data in lines2370to 2600with the help of a calculator.Eachnumberrepresentseightverticaldots. (See“Graphics commands”in Chapter4 for details.)

The patternis printedin four rows,each eightdots high and 65 dots wide. Lines 1800to 1850 read the dot data into a string array variablenamed LOGO$.Line 1860sets the line spacingto 8f12inch so that the rows will connectvertically.The loopin lines 1870to 1960doesthe printingin four passesof the print head.

86

Page 95
Image 95
Star Micronics LC-15 user manual How theprogram works