CORRECTED TABS
01234567890123456789012345678901234567890123456789
ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD
The printer also has its own method of setting TAB stops. This
method sets up a number of fixed tab positions and is therefore more
suitable for fixed tables, whereas the BASIC TAB function, used in
conjunction with the <CTRL>-1 n? command, is more suitable for
variable tabbing. In order to use printer tabs, you first need to use the
following printer escape sequence to set the tab positions:
<ESC> D
nt n2
nk
In BASIC you would send this sequence with the command:
PRINT CHR$(27);
"D";
CHR$(n1); CHR$(n2);
CHR$(nk): CHR$(0)
after first turning on the printer with PR
# 1.
nt, n2, ... nk are the tab stop positions, and must be in the range
1�n � 137. You can set up to 32 tab positions across the page. To print
strings at successive tab positions, print CHR$(9) or send <CTRL>-1
before each string. To avoid conflict with the <CTRL>-1 interface
commands the TAB character must be sent by means of the
<CTRL>-1
n<
command of the #8133 interface. This is a way of
sending a single character straight to the printer without the interface
card interpreting it first. (For a further discussion of this command see
page 31.)
-
On the RX-80 series printers, the <ESC> D command is not
available, and fixed tabs have to be set with the <ESC> e command.
The following program illustrates how the <ESC> D command sets
up fixed tabs, and then how <CTRL>-1 9< can be used to print at
successive tab positions.
24
10 DS
=
CHRS !13)
+
CHRS !4l
20 PRINT DS;"PR£1"
30 FOR Y
=
1 TO 5
40 FOR X
=
0 TO 9
SO PRINT X;
60 NEXT
X
70 NEXT Y
80 REN SET UP TABS AT
90 REN POSITIONS 12, 20 AND 30
100 PRINT CHR$ (27l;
1
D
1;
110 PRINT CHR$ (12!; CHR$ !201; CHRS (30!;
CHR$ (01
115 REN PRINT AT TAB POSITIONS
120 FOR
J
=
1 TO 3
130 PRINT CHR$ (9l;
1
9<";"ABCD";
140 NEXT
J
150 PRINT D$;"PR£0
1
01234567890123456789012345678901234567890123456789
ABCD
ABCD
ABCD
25