69
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 CHR$(27);"0" : ' 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 (as shown on page 70). 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.
SETTING LEFT AND RIGHT MARGINS
The left and right margins of this printer work just like a typewriter - once they are set all printing is done between them. You can set margins either by using the keys on the control panel, as described in Chapter 3, or by escape commands. The commands to set the margins are given in Table
.