Howthe programworks
ThisprogrambeginsbyassigninganumberofprintercommandstoBASIC
stringvariables(lines1000to1070).Youcan fmdmostofthese commands
nearthe beginningofchapter7.
TheWIDTH“LPT1:“255statementinline 1090meansintlnitelinewidth.
Itpreventsthe IBM-PC frominsertingunwantedcarriagereturnsand line
feedsin graphicsdata.
Actualprintingbeginsin line 1100.Usingthe preassignedcommands,the
pmgramprintssamplesofitsdiffemntfonts,followedbysarnplesoftheprint
pitches,thensomedouble andquadruple-sizedprinting.
Next comesthe central attraction of theprogram: aline of textprinted
fourteentimesinexpandingandcontractingloopstogiveabarreleffect.The
woxicisdonebyfourprintercommands:acommandsettingtherightmargin
(line1370);acenteringcommand(line 1390);acommandtovary theline
spacing(l”mes1410and1460);and acommandto micro-adjustthespace
betweencharactem(lines1420and 1470).
Nexttheprogramreturnstonormalspacingandgivesademonstrationofthe
printer’sword-processingabilities:italicprinting,boldprinting,underlin-
ing,subscripts,etc.
Therowofcarsymbolsinthenextprintedlineiscreatedbydownloadingtwo
new characterpatterns, whichare printed in place of the character “<”
(character60).Detailscan befoundin Chapter8.
‘l%efinalpartoftheprogramusesdotgraphicstopnntsome“SW’’logoswith
variousdensities.
Thedot pattern of the logo was originallylaid out on graph paper,then
eonvertedtothedatainlines2400to2670 withthehelpofacalculator.Each
number~presentseightverticaldots.(See’’Graphicscommands”inChapter
7fordetails.)
Thepatternis printed infour rows,each eightdotshigh and65 dotswide.
Lines 1770to 1840~ad the dot data into astring array variable named
LOGO$.Line 1850setsthe linespacingto 8fl’2inchso that therows will
connectvertically.Theloopin lines1860to 1940andlines1960to 2040do
theprintingin fourpassesof theprint head.
126