next up previous

2.4 I/O     continued...

The number of times per second the full screen is painted determines the refresh rate. If the rate is too low, the image will flicker, since the bright spots on the phosphor will fade before the gun comes back to that spot on the next pass. Refresh rates vary from 30 times per second up to 60 times per second.

The individual locations on a screen that can be either painted or not are known as pixels (from ``picture cell''). The resolution of the image is the number of pixels per inch. A high resolution display will have enough pixels in a given area that from a reasonable distance (an arm's length away) the gaps between pixels are not visible and a sequence of pixels that are all on will appear to be a continuous line. A common screen size is 1280 pixels across and 1024 pixels high on a 16'' or 19'' monitor.

The controller for the electron gun decides whether a pixel will be black or white by reading information from a memory that has one bit per pixel. If the bit is a 1, the pixel will be painted, otherwise it will remain dark. From the PMS diagram in Figure 1 you can see that the display memory on the Macintosh was part of the main memory. The operating system set aside a portion of the main memory for displays, and all an application had to do to paint something on the screen was to write a bit pattern into this portion of memory. This was an economical choice for the time (early 1980s), but it came at the cost of performance: the processor and video console had to alternate accesses to memory. During periods when the electron gun was being moved back to the upper left hand corner, the display did not access memory, and the processor was able to run at full speed. Once the gun was positioned and ready for the next scan line, however, the processor and display went back to alternating memory cycles.