Line 30 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 10 increases the value of n (the variable I in the program) each time it is executed. So the line spacing in- creases as the program continues. Line 20 just shortcuts the loop when I = 13, since BASIC won’t let us send CHR$( 13) without adding an unwanted CHR$( 10) to it. Finally, the < ESC > “2” in line 60 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 IBM mode, you cannot get the printout as shown above.
The command < ESC> “A” CHR$(n) 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 defind by the previous < ESC > “A”.
So, you need to change the following lines to the previous program as shown below for the IBM mode:
30 LPRINT CHR$(27) "A" CHR$(I); : LPRINT CHR$(27) IIII.
2,
79 LPRINT CHR$(27) "A" CHR$(12); : LPRINT CHR$(27) fl11
2
-
-
-
-
-
You may wonder why they picked l/72 of an inch as the in- |
| |||||
crement | 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 line as one |
| |||||
you | want finer | spacing, | like one half dot | spacing | __ | |
(STAR mode) or one third dot spacing (IBM mode). |
|
|
The < ESC > “3” CHR$(n) command sets the line spacing in increments of l/ 144 inch (STAR mode) or i/216 inch (IMB mode).
Change line 30 in your program so it is like this: | - |
|
30 LPRINT CHR$(27) "3" CHR$(I);
and run the program again. Now the results will look like this: | - |
| - |
50