Line 20 selects single-density 24-pin graphics (mode 32 from Table 6-1) and also reserves 40 columns for graphics. Since 24-pin graphics requires three bytes of data for each column, line 30 begins a loop to supply 120 bytes of data. Line 40 contains the number 170 that produces the first pin pattern shown in Figure 6-2, and line 50 finishes the loop.

Using hand-calculated data to print graphics

With what you know now, you can use the simplest application of graphics-using hand-calculated data to print graphic images. While this method is the most tedious, it helps you understand dot graphics. Also, it is useful for small graphic elements that are used many times.

Figure 6-3 shows how you can use a grid to plan where you want dots to be printed. This grid is for a single line of graphics 42 columns long. Since each line of 24-pin graphics is approximately 1/8th of an inch high and since triple-density graphics prints 180 dots per inch horizontally, a design planned on this figure will be about 1/8th of an inch high and less than 1/4th of an inch wide.

Figure 6-3. Pattern on grid

The actual pattern that the LQ prints on the paper is, of course, made up of dots that overlap each other both vertically and horizon- tally. The reason the planning grid uses an X for each dot is that using an accurate representation of the dots makes calculating the data numbers difficult because they cover up each other. Therefore, remember that each X represents the center of a dot, and the dots actually overlap each other.

6-7