47
Sample Program
100 REM
S e t Page Length (ESC FF n)
1 1 0 LPRINT CHR$ ( 27 ) ; CHR$ ( 26 ) ; " I" ; : REM RESET
1 20 REM
S e t Page Leng th to 5 Lines
130 LPRINT CHR$ ( 2 7 ) ; CHR$ ( 1 2 ) ; CHR$ ( 5 ) ;
1 40 FOR N=1 TO 2
1 5 0 FOR 1=1 TO 3
1 6 0 LPR I NT ''L i ne''
;
I ''
·-k...,':1,...,':..,':··k--,':...,':-;':...,':;':...,':-;':...,':--,':;':...,':;':1:;':·k·k''
1 7 0 NEXT I
1 8 0 LPRINT CHR$ ( 1 2 ) ; : ' Form Feed
190 NEXT N
200 LPRINT " - - - - - - - - - - - - -END- - - - - - - - - - - - -"
Sample Printing
4) Horizontal tab (HT)
L
in e
1
;':··::·k;':-;',...,':-;':·k-::...,·,...,·,...,,,..,,,,.,,,...,,,..,,,...,,,...,,,...,,,..,,, .. ;,...,•,
L ine 2
··k-;':-,•,...,•:-,':·k·k-;':;':;':;':;':;':-;':;':;':··k-k•k;':;':··k
L ine 1
-;',...,,,...,,,...,,, ..
-::...,,,...,,,..,,,...,,,...,,,...,,,...,,,.k...,':-}:··k
-,
':;',--,',...,':--.',-,',
L
in e
2
...,.,...,,,,.,·ki':--,',...,':;':;':·k...,':...,•:...,•:...,':··k·k·-k;':--.':;':;':··:,
L i n e 3
...,.,.., .• ..., .• .., .•
i':··k--.',...,':;':;':·k-;':;':-k;':...,':;'o':·k•k;':;':
- - - - - - - - - - - - -END- - - - - - - - - - - - -
Format • LPR I NT CHR$(9)• or LPR I NT CHR$(&H9)
Function • When the HT code is received, the carrier moves right to the next
tab.
Sample Program and Sample Printing Refer to Item 6) Set horizontal tab
5) Absolute horizontal tab to position "n- 1 " (ESC HT n)
Format • LPR I NT CHR$(27);CHR$(9);CHR$(n); or l'.:PR I NT
·
CHR$(&H1B);CHR$(&H9);CHR$(n); n = 1 to 126
Function • This escape sequen,ce moves the carrier to the position specified
by n, regardless of any tabs. This is a one line com mand, and
does not set a tab.
Many computers do not correctly send CHR$(9) data, in which
case print out will differ from the sample below.
Sample Program
1 0 0 REM
Abs o lu t e Tab to n- 1 (ESC HT n)
1 1 0 LPRINT CHR$ ( 27 ) ; CHR$ ( 26 ) ; " I" ; : REM RESET
1 20 LPRINT " 0 1 2 345678901 2 34 5 6 7 8901 2345678901 2 345678901234567 89"
1 3 0 REM
Tab to n- 1
140 LPRINT CHR$ ( 2 7 ) ; CHR$ ( 9 ) ; CHR$ ( 10 ) ;
1 5 0 LPRINT "A-Tab"
160 LPRINT CHR$ ( 2 7 ) ; CHR$ ( 9 ) ; CHR$ ( 20 ) ;
1 7 0 LPRINT "A-Tab"