Printer Users Manual

How theprogramworks
ThisprogrambeginsbyassigninganumberofprintercommandstoBASIC
stringvariables(lines1000to 1090).Youcanfindmostofthesecommands
nearthebeginningof chapter4.
TheWIDTH“LPT1:”255statementinline 1110meansinfhite linewidth.
It preventsthe IBM-PCfrominsertingunwantedcarriagereturnsandline
feedsin graphicsdata.
Actualprintingbeginsin line 1120.Usingthepreassignedcommands,the
programprintssamplesof itsdifferentfontstyles,includingalineshowing
all styles in italics, followedby samplesof the print pitches,then some
doubleand quadruple-sizedprinting.
Next comes the centralattractionof the program:a line of text printed
fourteentimesinexpandingandcontractingloopstogiveabarreleffect.The
workisdonebyfourprintercommands:acommandsettingtherightmargin
(line1400);a centeringcommand(line1420);a commandto varythe line
spacing(lines 1440and 1490);and a commandto micro-adjustthe space
betweencharacters(lines 1450and 1500).
Nexttheprogramreturnstonormalspacingandgivesademonstrationofthe
printer’sword-processingabilities:bold printing,underlining,subscripts,
etc.
The rowof automobilesin thenextprintedlineis createdby downloading
twonewcharacterpatterns,whichareprintedin placeof thecharacter“<”
(character60). Detailscanbe foundin Chapter5.
The finalpart of theprogramusesdotgraphicsto printsome“SW”logos
withvariousdensities.Thedotpatternofthelogowasoriginallylaidouton
graphpaper,thenconvertedto thedatain lines2370to 2600withthehelp
of a calculator.Eachnumberrepresentseightverticaldots.(See“Graphics
commands”in Chapter4 for details.)
Thepatternis printedin fourrows,eacheightdotshighand65 dotswide.
Lines 1800to 1850read the dot data into a string array variablenamed
LOGO$.Line 1860setsthelinespacingto 8f12inchso thatthe rowswill
connectvertically.Theloopin lines 1870to 1960doestheprintingin four
passesof theprinthead.
86