10 ' Demo of top and bottom margins
60 LPRINT CHR$(12); :' form feed
70 FOR I=1 TO 150
80 LPRINT "THIS IS LINE";1
90 NEXT I
110 LPRINT CHR$(12) :' form feed
120 END
When you run this program it will print 150 lines right down
the page and across the perforations. When it’s done line 110
sends a form feed to advance to the top of the next page. Look at
the lines that have printed near the perforations. Separate the
sheets and see if any of the lines have been torn in half. These
are the problems that the top and bottom margins will solve.
Now add the following lines to your program. (Don’t forget
the semicolons or you won’t get quite the same results that we
did.)
20 1 Leave 6 blank lines at the bottom of page
30 LPRINT CHR$(27);"N";CHR$(6);
40 ' Start top of page at line 6
50 LPRINT CHR$(27);"r";CHR$(6);
100 LPRINT CHR$( 27) poff; I clear top and bottom
margins
Now when you run the program, your printer skip the first six
lines and the last six lines on each page. Always send a form
feed after setting the top margin, or it will not work on the first
page printed. That’s because the top margin only takes effect
after a form feed.
Line 50 sets the top margin, line 30 sets the bottom margin,
and line 100 clears both margins when we are done.