Fundamentals of Dot Matrix Printing
Line 40 reveals that the variable M is used to control the number of times line 90 is executed. When I is small, M is large. When I is greater than 12, M is fixed to 2. Line 50 sets the vertical line spacing (you may recall that ESC = CHR$(27), “3” = CHR$(Sl)). So, in this program, line 50 sets the vertical spacing to 11144inches.
Line 60 starts a loop that uses the value of M to count 25 times when I equals 1, and counts 3 times when I is greater than 12. Line 70 prints a message telling us the value of the line spacing on the
Line 90 is where the action is. This line is similar to line 140 in the first reference program and prints 40 characters; its ASCII code is 241. This character is a
Line 100 and 110 end the J loops, and line 120 resets the printer and ends the program.
Discussion of the Vertical Spacing Program
Let’s start by looking at how close the dots are vertically in Figure
When we use block graphics (where each block is 6 dot- spaced high), we set the vertical spacing to 6/72 (or 12/144)inches.
The maximum value of n allowed for the vertical spacing control code is 127.The result is that almost one inch (127/144ths) for the ESC “3”n code, and roughly
In the sample program, we stopped I at 30, so the printout would fit on a standard
87