65
Table |
| |
Line feed commands | ||
Function | Control code | |
Return print head to left margin CHR$(lS) | ||
Advance paper one line | CHR$(10) | |
Reverse paper one line | (ESC) | CHR!$(lO) |
Adds (LF) to every (CR) | (ESC) | “5” 1 |
Restore normal function of (CR) (ESC) “5” 0
nChanging the line spacing
When you turn your printer on, the line spacing is set to 6 lines per inch (or 8 lines per inch if DIP switch
fine for most printing applications, but when you want something different, the printer makes it easy to set the line spacing to whatever you want.
Try this program to see how easy it is to change the line spac- ing:
NEW
10 ’ Demo of line spacing
20 FOR I=1 TO 25
30 IF I=13 THEN 60
40 LPRINT CH.R$(27);"A";CHR$(I);
50 LPRINT "THIS LINE SPACING IS SET TO";1
60 NEXT I
70 LPRINT "LINE SPACING IS SET TO l/6 INCH (NORMAL)." 80 LPRINT CHR$(27);"2"
90 END
Line 40 changes the line spacing. The command (ESC) “A” CHR$(n) changes the line spacing to n/60 of an inch. The loop that is started in line 20 increases the value of n (the variable I in this program) each time it is executed. So the line spacing in- creases as the program continues. Line 30 just shortcuts the loop when I = 13, since BASIC won’t let us send CHR$(13) without adding an unwanted CHR$( 10) to it. Finally, the (ESC)
“2” in line 80 resets the line spacing to 6 lines per inch. This is a shortcut that is the same as (ESC) “A” CHR$(lO).