I
How theprogram works
Thisprogrambeginsby assigninga numberof printercommandsto BASIC stringvariables(lines 1000to 1090).Youcan findmostof thesecommands near the beginningof chapter4.
The WIDTH“LPT1:”255 statementin line 1110meansinfiite line width. It preventsthe
Actualprintingbeginsin line 1120.Usingthe preassignedcommands,the programprints samplesof its diffenmtfonts, includinga line showingall stylesin italics,followedby samplesof the printpitches,then somedouble and
Next comes the central attractionof the program: a line of text printed fourteentimesinexpandingandcontractingloopstogiveabarreleffect.The workisdoneby fourprintercommands:a commandsettingtherightmargin (line 1400);a centeringcommand(line 1420);a commandto vary the line spacing(lines 1440and 1490);and a commandto
Nexttheprogramnmmnsto normalspacingandgivesa demonstrationofthe printer’s
The row of automobilesin the nextprintedline is createdby downloading two new characterpatterns,whichare printedin placeof the character“e” (character60). Detailscan be foundin Chapter5.
The final part of the programuses dot graphicsto print some “SW” logos withvariousdensities.Thedotpatternof thelogowasoriginallylaid outon graphpaper,then convertedto the data in lines 2400to 2630with the help of a calculator.Each number~presents eightverticaldots. (See “Graphics commands”in Chapter4 for details.).
The patternis printedin four rows,each row is eightdotshigh and 65 dots wide.Lines 1800to 1850madthedotdataintoa stringarrayvariablenamed LOGO$.Line 1860sets the line spacingto 8/72 inch so that the rows will connectvertically.The loop in lines 1870to 1960doesthe printingin four passesof the print head.
86