There it is, a reference sheet that summarizes the various type styles that Gemini can produce. If your printout looks like Figure 5-2, great! Turn your printer “off:’advance the paper, and tear off the tables. We will now analyze the program and printout to learn how we managed to do what we did.

On the Other Hand. . .

If you made a typing error that caused the program to “bellyflop:’ or if your printout looks strangely dissimilar to Figure 5-2, you should reset Gemini and try again. The printer may have received an unwanted function code. Or, perhaps the communication became garbled between your computer and Gemini. Whatever the problem, reset (initialize) Gemini and try again.

ANALYZING THE PROGRAM

In this section, we’ll analyze the program you entered, using Figure 5-l as your reference. Before we start, you might want to SAVE the program on disk or tape to avoid having to retype it if you ever want to use it again.

Let’s begin by considering line 10, shown in Figure 5-l. This line tells the BASIC interpreter that the printer will accept 132 characters per line. This prevents BASIC from tossing in extra carriage returns and line feeds where we don’t want them.

Lines 20 through 70 are used to set some printer controls to more easily remembered codes. The escape code (which is ASCII decimal code 27) is set to ESC$. The command that tells the printer to advance one line (ASCII code 10) is set to LF$. The variable FF$ is set to ASCII code 12, a command to Gemini that the printer should advance to the top of the next page. Thedefault value, set by power “on”or receipt of the software reset, is 66 lines per page.

Line 30 sets the printer command to change type size. The format of this command is ESC$ + “B” + n, where n can be 1, 2, or 3. If n is 1, the type size is 10 characters per inch (CPI). This is the type size of a standard typewriter’s print, called “pica?Pica is the type size you select when Gemini is initialized, until and unless you ask for different type size. If n is 2, the type size is 12 CPI, the same size as “elite” typewriter print. If n is 3, the type size is 17 CPI, the size of the compressed type we used for the listing in Figure 5-1.

65

Page 71
Image 71
Gemini Industries Printer user manual On the Other Hand, Analyzing the Program