Star Micronics NB-15 User Manual page 71

Star micronics printer user's manual
Table of Contents

Advertisement

SETTING LEFT AND RIGHT MARGINS
The left and right margins
of this\printer
work just like a
typewriter
- once they are set all the printing is done between
them. The commands to set the margins are given in the follow-
ing table:
Table
6-5
Left and right margin
commands
Function
Control
code
Set left margin at column n
(ESC)"l"CHR$(n)
Set right margin at column n
(ESC)"Q"CHR$(n)
Try setting the margins with this program:
10 ' Demo of margins
20 GOSUB 70
30 LPRINT C~$(27);"1";CHR$(lO);
40 LPRINT CHR$(27);"Q";CHR$(70);
50 GOSUB 70
60 END
70 FOR I=1 TO 80
80 LPRINT "X" ;
90 NEXT I
100 LPRINT
110 RETURN
The first thing that this program
does is to branch to the
subroutine
that starts in line 70 . This subroutine
prints 80 X's
in a row. The first time that the subroutine
is used, all the X's fit
in one line. Then line 30 sets the left margin to 10, and line 40
sets the right margin to 70. Once again the subroutine
is used,
but this time the X's won't all fit on one line since there is now
only room for 60 characters
between the margins.
Run the program.
The results will look like this:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
When you want to reset the margins to the default values, you
have two choices. You can either turn the printer off and back

Advertisement

Table of Contents
loading

Table of Contents