Star Micronics XB-2420 Printer User Manual


 
How theprogramworks
ThisprogrambeginsbyassigninganumberofprintercommandstoBASIC
stringvariables(lines1000to 1060).Youcanfindmostofthesecommands
nearthe beginningof chapter7.
TheWIDTH“LPT1:“255statementinline1080meansinfinitelinewidth.
It preventsthe IBM-PCfrominsertingunwantedcarriagemtumsandline
feedsin graphicsdata.
Actualprintingbeginsin line 1090.Usingthe preassignedcommands,the
programprintssamplesofitsdifferentfonts,followedbysamplesoftheprint
pitches,thensomedoubleandquadruple-sizedprinting.
Next comes the central attractionof the program:a line of text printed
fourteentimesinexpandingandcontractingloopstogiveabarreleffect.The
workisdonebyfourprintercommands:acommandsettingtherightmargin
(line 1450);a centeringcommand(line 1470);a commandto varytheline
spacing(lines 1490and 1540);and a commandto micro-adjustthe space
betweencharacters(lines1500and 1550).
Nextthepmgrarnreturnstonormalspacingandgivesademonstrationofthe
printer’sword-processingabilities:italicprinting,boldprinting,underlin-
ing,subscripts,etc.
The row of telephone symbols in the next printed line is created by
downloadingtwonewcharacterpatterns,whicharcprintedin placeof the
character“<” (character60).Detailscanbe foundin Chapter8.
Thefinalpartoftheprogramusesdotgraphicstoprintan”M&W“logo.The
dotpatternofthelogowasoriginallylaidoutongraphpaper,thenconverted
to thedatainlines3180to4640withthehelpofacalculator.Eachnumber
representseightvexticaldots.(See“Graphicscommands”in Chapter7 for
details.)
The patternis printedin threerows,each rowis twenty-fourdotshighand
240dotswide.Line2040setsthelinespacingto 8/60inchso thattherows
willcomect vertically.Theloopinlines2050to 2130doesthe printingin
threepassesoftheprinthead.
140