The form feed (CHR$(J2)) in line 50 caused the printer to
move to the top of a new page before printing the last two lines.
A note to TRS-80 users: CHR$(12) is a problem code for the
TRS-80. To send a form feed command to SG-lo/15 you must
add 128 to it making it CHR$(140). Use CHR$(140) where we
use CHR$(12) in these programs.
CHANGING THE PAGE LENGTH
You may have some computer forms that you wish to use with
SG- 10/l 5 that are not 11 inches high. That’s no problem, because
you can tell SG-lo/15 how high the forms are that you are using.
There are two commands for doing this, shown in this table:
Table 6-3
Form length commands
Function 1 Mode 1 Control code
Set the pagelengthton lines STAR <ESC > “c” CHR!f@)
IBM < ESC > “C” CHR!$(n)
Set the page length to n inches STAR < ESC > “c” CHR!$(O) CHR!$(n)
IBM -=c ESC > “c” CHR!iXO) CHR!%j
Let’s set up a 7 inch high form length, which is typical of many
computer checks. The following program will do it.
18 'Demo variable form lengths.
20 LPRINT CHR$(27) "C" CHR$(Q) CHR$(7) ; 'Form length 7
inches.
341 LPRINT "Pay to the order of:"
441 LPRINT CHRS(12) ; 'Form feed.
50 LPRINT "Pay to the order of:"
This program should print “Pay to the order of:” twice, and
they should be 7 inches apart. Line 20 sets the form length to 7
inches. After line 30 prints, line 40 sends a form feed advance
the paper to the top of the next form. Line 50 then prints its
message.
-
After you have run this program, turn off the printer and adjust
the top of form position. When you turn the printer back on
the page length will be reset to its normal setting (usually 11
inches).
56