pw
ThisprogrambeginsbyassigninganumberofprintercommandstoBASIC
stringvariables(lines1000to 1090).Youcanfindmostof thesecommands
nearthe beginningofchapter4.
TheWIDTH“LPT1:“255 statementinline1110meansintlnitelinewidth.
Itprevents theIBM-PCfrom insertingunwantedcarriagereturnsand line
feedsin graphicsdata.
Actualprintingbeginsin line1120.Using thepreassignedcommands,the
programprintssamples ofits differentfonts, includingalineshowing all
stylesinitalics, followedbysamplesofthe printpitches,thensomedouble
andquadruple-sizedprinting.
Next comesthe central attraction of theprogram: aline of textprinted
fourteentimesinexpandingandcontractingloopstogiveabarreleffect.The
workisdoneby fourprintercommands:acommandsettingtherightmargin
(line14@); acenteringcommand(line1420);acommandtovary theline
spacing(lines 1440and 1490);and acommandto micro-adjustthe space
betweencharactm (lines1450 and15W).
Nexttheprogramreturnstonormalspacingandgivesademonstrationofthe
printer’swc)rd-processingabilities:boldprinting,underlining,subscripts,
etc.
Therow ofautomobilesin thenext printedlineis createdby dGwrdoading
twonew characterpatterns,whichareprintedin placeof the character“<”
(character60).Detailscan be fwnd in Chapter5.
Thefinal partof the programusesdot graphicstoprint some“SW” IGgm
withvariousdensities.Thedotpatternof thelogowasoriginallylaidout on
graphpaper,then convertedtothe datainlines 2400to 2630with thehelp
ofacalculator.Eachnumber ~presentseightverticaIdots.(See “Graphics
cGmmands”in Chapter4fordetails.)
Thepatternis printedin fourrows,each rowis eightdotshigh and65dots
wide.Lines1800to 1850readthedotdataintoastringarray variablenamed
LOGO$.Line 1860sets thelinespacingtG 8/72inchso thatthe rowswill
connectvertically.Theloopin lines1870tG1960dGestheprintingin four
passesof the printhead.
86