WELCOME

WELCOME !!!
Powered By Blogger

how do you find my blog?

comment

hello

Search This Blog

Pages

Friday, May 14, 2010

Character-Map Terminals
Three kinds of terminals are in common use: character-map terminals, bitmap
terminals, and RS-232-C terminals. They all can use any keyboard type, but
they differ in the way the computer communicates with them and how the output
is handled. We will now briefly describe each kind.
On a personal computer, there are two ways to organize the output to the
screen: a character map and a bit map. Figure 2-6 shows how a character map is
used to display output on the monitor. (The keyboard is treated as a completely
separate device.) On the serial communication board is a chunk of memory,
called the video memory, as well as some electronics for accessing the bus and
generating video signals.
CPU
Character
Attribute
Analog video signal
Monitor
ABC
Bus
Video
RAM
Main
memory
Video
board
A2B2C2
Figure 2-6. Terminal output on a personal computer.
To display characters, the CPU copies them to the video memory in alternate
bytes. Associated with each character is an attribute byte that describes how that
character is to be displayed. Attributes can include its color, intensity, whether it
is blinking, and so on. Thus a screen image of 25 ´ 80 characters requires 4000
bytes of video memory, 2000 for the characters and 2000 for the attributes. Most
boards have more memory to hold multiple screen images.
The job of the video board is to repeatedly fetch characters from the video
RAM and generate the necessary signal to drive the monitor. An entire line of
characters is fetched at once so the individual scan lines can be computed. This
signal is a high-frequency analog signal that controls the scanning of the electron
beam that paints the characters on the screen. Because the board outputs a video
signal, the monitor must be within a few meters of the computer to prevent distortion.
Bit-map Terminals
A variation on this idea is to have the screen not be regarded as a 25 ´ 80 array
of characters, but as an array of picture elements, called pixels. Each pixel is
either on or off. It represents one bit of information. On personal computers the
SEC. 2.4 INPUT/OUTPUT 97
screen may contain as few as 640 ´ 480 pixels, but more commonly 800 ´ 600 or
more. On engineering workstations, the screen is typically 1280 ´ 960 pixels or
more. Terminals using a bit map rather than a character map are called bit-map
terminals. All modern video boards can operate either as character-map terminals
or bit-map terminals, under software control.
The same general idea is used as in Fig. 2-6, except that the video RAM is
just seen as a big bit array. The software can set any pattern it wants there, and
that is displayed instantly. To draw characters, the software might decide to allocate,
for example, a 9 by 14 rectangle for each character and fill in the necessary
bits to make the character appear. This approach allows the software to create
multiple fonts and intermix them at will. All the hardware does is display the bit
array. For color displays, each pixel is 8, 16, or 24 bits.
Bit-map terminals are commonly used to support displays containing several
windows. A window is an area of the screen used by one program. With multiple
windows, it is possible to have several programs running at the same time, each
one displaying its results independent of the other ones.
Although bit-map terminals are highly flexible, they have two major disadvantages.
First, they require a considerable amount of video RAM. The most
common sizes these days are 640 ´ 480 (VGA), 800 ´ 600 (SVGA), 1024 ´ 768
(XVGA), and 1280 ´ 960). Notice that all of these have an aspect ratio
(width:height) of 4:3, to conform to the current ratio for television sets. To get
true color, 8 bits are needed for each of the three primary colors, or 3 bytes/pixel.
Thus a 1024 ´ 768 display, requires 2.3 MB of video RAM.
As a result of this large requirement, some computers compromise by using
an 8-bit number to indicate the color desired. This number is then used as an
index into a hardware table, called the color palette that contains 256 entries,
each holding a 24-bit RGB value. Such a design, called indexed color, reduces
the memory video RAM memory requirements by 2/3, but allows only 256 colors
on the screen at once. Usually, each window on the screen has its own mapping,
but with only one hardware color palette, often when multiple windows are
present on the screen, only the current one has its colors rendered correctly.
The second disadvantage of a bit-map display is performance. Once application
programmers realize that they can control every pixel in both space and time,
they want to do it. Although data can be copied from the video RAM to the monitor
without going over the main system bus, getting data into the video RAM does
use the system bus. To display full-screen, full-color multimedia on a 1024 ´ 768
display requires copying 2.3 MB of data to the video RAM for every frame. For
full-motion video, a rate of at least 25 frame/sec is needed, for a total data rate of
57.6 MB/sec. This load is far more than what the (E)ISA bus can handle, so
high-performance video cards on IBM PCs need to be PCI cards, and even then,
major compromises are required.
A related performance problem is how to scroll the screen. One way is copying
all the bits in software, but doing this puts a gigantic load on the CPU. Not
98 COMPUTER SYSTEMS ORGANIZATION CHAP. 2
surprisingly, many video cards are equipped with special hardware for moving
parts of the screen by changing base registers rather than copying.
RS-232-C Terminals
Dozens of companies make computers and many others make terminals (especially
for mainframes). To allow (almost) any terminal to be used with (almost)
any computer, a standard computer-terminal interface, called RS-232-C, has been
developed by the Electronics Industries Association (EIA). Any terminal that
supports the RS-232-C interface can be connected to any computer that also supports
this interface.
RS-232-C terminals have a standardized 25-pin connector on them. The RS-
232-C standard defines the mechanical size and shape of the connector, the voltage
levels, and the meaning of each of the signals on the pins.
When the computer and the terminal are far apart, it is frequently the case that
the only practical way to connect them is over the telephone system. Unfortunately,
the telephone system is not capable of transmitting the signals required
by the RS-232-C standard, so a device called a modem (modulator-demodulator)
has to be inserted between the computer and the telephone and also between the
terminal and the telephone to perform signal conversion. We will study modems
shortly.
Figure 2-7 shows the placement of the computer, modems, and terminal when
a telephone line is used. When the terminal is close enough to the computer that it
can be wired-up directly, modems are not used, but the same RS-232-C connectors
and cables are still used, although those pins related to modem control are not
needed.
To communicate, the computer and terminal each contain a chip called a
UART (Universal Asynchronous Receiver Transmitter), as well as logic to
access the bus. To display a character, the computer fetches a character from its
main memory and presents it to the UART, which then shifts it out onto the RS-
232-C cable bit-for-bit. In effect, the UART is really a parallel-to-serial converter,
since an entire character (1 byte) is given to it at once, and it outputs the
bits one at a time at a specific rate. It also adds a start bit and a stop bit to each
character to delimit the beginning and the end of the character (at 110 bps, 2 stop
bits are used).
In the terminal, another UART receives the bits and rebuilds the entire character,
which is then displayed on the screen. Input from the terminal’s keyboard
goes through a parallel-to-serial conversion in the terminal and is then reassembled
by the UART in the computer.
The RS-232-C standard defines almost 25 signals, but in practice, only a few
are used (and most of those can be omitted when the terminal is wired directly to
the computer without modems). Pins 2 and 3 are for transmitting and receiving
data, respectively. Each pin handles a one-way bit stream, in opposite directions.
SEC. 2.4 INPUT

No comments:

Post a Comment