Printing Capabilities

The Concept

We are going to construct a bit-image “map”of the sheet of paper in the computer’s memory. Then we’re going to print that image on paper by selectively firing the dot-producing pins on the print head.

As you know, the memory in your computer functions in terms of bits, which are represented as being either “0”or “1”. We’ll use each bit that’s part of our map to either be a dot (“1”) or a blank space (“0”).Our picture will be 360 dots wide (at 60 dots per linear inch) and 270 dots in height.

We are going to hold 6 bits in each character to avoid prob- lems that you might have with the carriage-return command and to let people with either 7-bit and 8-bit computers participate without significant adaptation of our program. This program, like the previous ones, is written for the IBM-PC, but the appendices at the back of this manual will tell you how to adapt this program to several other computers.

Figure 7-3. In this program, standard characters (the “o’s” in port- holes) are mixed with 6 x 6 block graphics on the same line.

The Program

The program listed in Figure 7-4 is made up of subroutines. A sam- ple output is provided (Figure 7-5) to illustrate the program’s capabilities.

So, before exercising our brains with explanations, let’s type in the program as written, and RUN it.

You may feel like it takes a long time to run the program. The

109

Page 115
Image 115
Gemini Industries Printer user manual Concept, Program