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
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
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
Nexttheprogramreturnstonormalspacingandgivesa demonstrationofthe
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