Star Micronics SR-10/I5 Summary, Control code, Function, LPRINT CHR$12 Form feed, margin

Models: SR-10/I5

1 130
Download 130 pages 19.46 Kb
Page 68
Image 68
10 'Demo top and bottom margins

10 'Demo top and bottom margins

20 LPRINT CHR$(12) ; 'Form feed.

30 FOR I = 1 TO 150

40 LPRINT "This is line" I

50 NEXT I

60 LPRINT CHR$(12) ; 'Form feed.

When you run this program it will print 150 lines right down the page and across the perforations. When it’s done line 60 sends a form feed to advance the paper to the top of the next page. Look at the lines that have printed near the perforations. Separate the sheets and see if any of the lines have been torn in half. These are the problems that the top and bottom margins will solve.

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.)

11 'Leave 6 blank lines at bottom of page.

12 LPRINT CHR$(27) 'IN"CHR$(G) ; 13 'Start top of page at line 6.

14 LPRINT CHR$(27) "R" CHR$(G) ;

55 LPRINT CHR$(27) "0" ; 'Clear top d bottom margins.

Now

when you run the program

with STAR

mode

SR- lo/15

 

-

will 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 tirst page printed. That’s because the top margin

 

 

only takes effect after a form feed.

 

 

 

 

 

Line

14 sets the top margin,

line

12 sets the

bottom

margin,

-

-

and line 55 clears both margins when we are done.

 

 

-

 

 

 

 

 

 

 

SUMMARY

Control code

CHRT( 10)

<ESC > CHR$( 10) CHR$( 13)

<ESC > “A” CHR$(n)

<ESC > “3” CHR$(n)

-

Function-

Line feed Reverse line feed Carriage return

Set line spacing to n/72 inch (for STAR mode)

Set line spacing to n/144 inch (for STAR mode)

58-

Page 68
Image 68
Star Micronics SR-10/I5 user manual Summary, Control code, Function, Demo top and bottom margins 20 LPRINT CHR$12 Form feed