Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Before we get into the details about resolution and color in video modes,
  let's consider how you select which video mode to use. The most efficient
  way to set up a video mode is to use assembly language to call the ROM
  BIOS. ROM BIOS interrupt 10H (decimal 16), service 00H, provides a way to
  select a video mode using the mode numbers listed in Figure 4-2. (See
  Chapter 9 for more details on this.)

  --------------------------------------------------------------------------
  Monitors
    The type of video display, or monitor, that might be used has an
    important effect on program design. Many monitors cannot produce color
    or graphics, and a few produce such a poor quality image that you can
    use only the 40-column text display format. The many kinds of monitors
    that can be used with the PC family of computers can be broken down into
    five basic types.

    Direct-drive monochrome monitors. These monitors are designed to work
    with the Monochrome Display Adapter (MDA), although you can also use
    them with an Enhanced Graphics Adapter (EGA). The green IBM Monochrome
    Display is reminiscent of IBM's 3270 series of mainframe computer
    terminals; it's no surprise that many business users are comfortable
    with the combination of an MDA and a green monochrome display.

    Composite monochrome monitors. These monitors are still among the most
    widely used and least expensive monitors available. They connect to the
    composite video output on the Color Graphics Adapter (CGA) and provide a
    fairly clear one-color image (usually green or amber). Don't confuse the
    composite monochrome monitor with the direct-drive monochrome monitor.
    The composite monochrome monitor can be attached only to the CGA,
    whereas the direct-drive monochrome monitor must be used with an MDA or
    EGA.

    Composite color monitors and TV sets. Composite color monitors use a
    single combined signal such as the composite video output of the CGA.
    The composite color monitor produces color and graphics but has
    limitations: An 80-column display is often unreadable; only certain
    color combinations work well; and graphics resolution is low in quality,
    so graphics must be kept simple by using low-resolution graphics modes.

    Although the standard television set (color or black-and-white) is
    technically a composite monitor, it usually produces an even
    lower-quality image than the dedicated composite monitor. Text displays
    must be in 40-column mode to ensure that the display is readable. TVs
    are connected to the composite video output of the CGA, but the
    composite signal must be converted by an RF adapter before going into
    the TV.

    RGB color monitors. The RGB monitors are considered the best of both
    worlds. They combine the high-quality text display of the monochrome
    monitors with high-resolution graphics and color. RGB stands for
    red-green-blue, and RGB monitors are so named because they use separate
    red, green, and blue color signals, unlike the composite monitors, which
    use only one composite signal. The image and color quality of an RGB
    monitor is much better than that available through any screen that
    connects to the composite video output.

    Variable-frequency monitors. One of the problems created by the
    proliferation of different video subsystems is that some subsystems
    produce color and timing signals with different frequencies or different
    encodings than other subsystems. For example, you cannot use a
    PS/2-compatible monitor with a CGA because the color information in the
    monitor drive signals is encoded differently by a CGA than it is by a
    PS/2 video subsystem (MCGA or VGA).

    Monitor manufacturers addressed this problem by designing
    variable-frequency RGB monitors that can be used with a wide range of
    signal frequencies and with more than one type of color signal encoding.
    For example, NEC's MultiSync monitors can adjust to the different signal
    frequencies generated by the CGA, the EGA, and the PS/2 video
    subsystems. These monitors also have a switch that lets you adapt them
    either to the digital color signal encoding used by the CGA and EGA or
    to the analog color signals used by the PS/2 subsystems.

    Many people use variable-frequency monitors because they anticipate the
    need to upgrade their video subsystems at some time in the future, and
    they don't want to be stuck with an incompatible monitor.
  --------------------------------------------------------------------------

  Many programming languages also offer high-level commands that select
  video modes for you. For example, BASIC gives you control over the video
  modes through the SCREEN statement but refers to them in its own way,
  using different mode numbers than the ROM BIOS routines. You can also
  control some of the video modes through the DOS MODE command. (See Figure
  4-3.)

  BIOS Mode Number         BASIC Statement to      DOS Statement to
  Hex          Dec         Change Mode             Change Mode
  --------------------------------------------------------------------------
  00H          0           SCREEN 0,0: WIDTH 40    MODE BW40
  01H          1           SCREEN 0,1:WIDTH 40     MODE CO40
  02H          2           SCREEN 0,0:WIDTH 80     MODE BW80
  03H          3           SCREEN 0,1:WIDTH 80     MODE CO80
  04H          4           SCREEN 1,0              n/a
  05H          5           SCREEN 1,1              n/a
  06H          6           SCREEN 2                n/a
  07H          7           n/a                     MODE MONO
  --------------------------------------------------------------------------

  Figure 4-3.  The BASIC and DOS commands used to change video modes.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson