Laser Printer Applications Manual
Also,notethat Autowrapdoesn’tmovethe wholeworddownto the next
line—that’sajob for a wordprocessor,not yourlaserprinter.
Pushing and popping the print position
Thisprovidesa wonderfulwaytokeeptrackoftheprintposition.it works
by lettingyoukeepa listof up to 20 printpositions.
Youcan“push”thecurrentprintpositionontothetop of thelistwhenever
youwant.Later,youcan“pop”offwhateverpositionis atthetopofthelist,
makingit thecurrentprintposition.
When would you want to save and restore print positions this way?
Wheneveryouneedtointerruptwhatyou’reprintingnowtosticksomething
specialontothepage.Thisismosthandywhenyouneedtojump fromtext
to graphicsand back.
Sayyou’vewrittenoneroutinethatputsthepagenumberin thesameplace
on.evcrypage, and anotherthat under certain circumstancesprints two
heavyIincs.Youprintmcrnly alonguntilyouhaveto printthelines.You
thenpushthe currentprintpositionto executetheline-printingroutine.
Butpart waythroughthat youhit the page-numberspot.So youpushthe
printpositionagainandrunthepage-numberroutine.Thenyoucanpopthe
printpositiontoprintthesecondline.Andwhenthat’sdoneyoupopitagain
to returnto printingtext.
As you mightsuspect,this can involvefairlycomplicatedprogramming,
typicallyusingthemacrocommandsdescribedlaterin this chapter.
To pushor pop a printpositionyousendthiscommand:
<ESC>&f n S
For n youenter Oto push(save)thecurrentprintposition,
or 1to pop(restore)thelast positionsavedoff thelist.
Note: The last positionpushedonto the list will alwaysbe the first onc
poppedbacklater.
69