Line 40 changes the line spacing. The command (ESC)“A”
CHR$(n) changes the line spacing to n/72 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$(lO) 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$(12).
When you run this program with the DIP switch l-6 off (IBM
mode), you cannot get the printout as shown above.
The (ESC) “A” CHR$(n) command in IBM mode only defines
the line spacing as n/72 of an inch; the (ESC) “2” command
changes the line spacing to the amount defined by the previous
(ESC) “A”.
So: you need to change the following lines to the previous pro-
gram as shown below for the IBM mode:
40 LPRINT CHR$(27>;"A";CHR$(I);CHR$(27);w2';
80 LPRINT CHR$(27); "A";CHR$(12);CHR$(27);"2"
You may wonder why they picked l/72 of an inch as the incre-
ment for the line spacing command. There’s a good reason: the
dots that the printer makes are l/72 inch apart. So this means
that you can vary the line spacing in increments as fine as one
dot - unless you want finer spacing, like one third dot spac-
ing.
The (ESC)“3”CHR$(n) command sets the line spacing in in-
crements of l/216 inch. Change line 40 in your program so it is
like this:
40 LPRINT CHR$(27);"3";CHR$(I);
. and run the program again. Now the results will look like this: