46
the printer how many blank lines should be left at the bottom of
the page.
Let’s try a simple application to see how these margins work.
Enter this program, which will print 150 lines without top and
bottom margins.
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.
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 ' 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 CHRS(27);"O"; : ' 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.
-^