I
Howthe programworks
ThisprogrambeginsbyassigninganumberofprintercommandstoBASIC
stringvariables(lines1000to1070).Youcan findmostofthesecommands
nearthe begimingof chapter4.
TheWIDTH“LPT1:“255statementinline 1090meansinfinitelinewidth.
Itpreventsthe IBM-PC frominsertingunwantedcarriagereturnsand line
feedsin graphicsdata.
Actualprintingbeginsin line 1100.Usingthe preassignedcommands,the
programprints samplesofits different fonts,followedby samplesof the
printpitches,then somedoubleandquadruple-sizedprinting.
Next comesthe central attractionof the program:aline of text printed
fourteentimesinexpandingandcontractingloopstogiveabarreleffect.The
workisdoneby fourprintercommands:acommandsettingtherightmargin
(line1370);acenteringcommand(line 1390);acommandtovarythe line
spacing(lines 1410and 1460);and acommandto micro-adjustthe space
betweencharactem(lines1420and 1470).
Nexttheprogramreturnstonormalspacingandgivesademonstrationofthe
printer’sword-processingabilities:italicprinting,boldprinting,underlin-
ing,subscripts,etc.
Therow ofautomobilesinthe nextprintedlineis created bydownloading
twonew characterpatterns,whichareprintedin placeofthe character“<”
(character60).Detailscan befound inChapter5.
Thefinal partof the programusesdotgraphicsto print some“SW”logos
withvariousdensities.Thedotpatternofthe logowasoriginallylaidouton
graphpaper,then convertedtothedata inlines2370 to2630with thehelp
ofacalculator.Eachnumberrepresentseightverticaldots. (See“Graphics
commands”inChapter4for details.)
Thepatternis printed infour rows,eacheightdots highand 65dots wide.
Lines 1800to 1870read the dot data into astring array variable named
LOGO$.Line 1880setsthe linespacingto 8/72inch sothat tie rowswill
connectvertically.Theloopin lines1890to 1990doesthe printinginfour
passesof theprinthead.
104