Star Micronics 4111 Printer User Manual


 
Note: Even when Autowrap is on, the printer will print beyond the right
margin if you have sent one of the direct positioning commands
described above, which move the print position past the margin.
Also, note that Autowrap doesn’t move the whole word down to the next
line that’s a job for a word processor, not your laser printer.
4.4.17 Pushing and popping the print position
This provides a wonderful way to keep track of the print position. It works
by letting you keep a list of up to 20 print positions.
You can “push” the current print position onto the top of the list whenever
you want. Later, you can “pop” off whatever position isat the top of the list,
making it the current print position.
When would you want to save and restore print positions this way? When-
ever you “needto interrupt what you’re printing now to stick something
special onto the page. This is most handy when you need to jump from text
to graphics and back.
Say you’ve written one routine that puts the page number in the same place
on every page, and another that undercertain circumstances printstwo heavy
lines.You print merrily along untilyou have to print the lines.You then push
the current print position to execute the line-printing routine.
Butpart way through thatyouhitthepage-number spot. Soyoupushtheprint
position again and run the page-number routine. Then you can pop the print
position to print the second line. And when that’s done you pop it again to
return to printing text.
As you might suspect, this can involve fairly complicated programming,
typically using the macro commands described later in this chapter.
To push or pop a print position you send this command:
<ESC> &f n S
Fern youenterOtopush (save) thecurrent printposition,or 1to pop (restore)
the last position saved off the list.
60