[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BGI Run-time Architecture

Programs produced by Borland languages create graphics via two entities
acting in concert: the generic BGI Kernel and a device-specific driver.
Typically, an application built with a Borland compiler will include
several device driver files on the distribution disk (extension .BGI) so
that the program can run on various types of screens and printers.
Graphics requests (for example, draw line, draw bar, etc.) are sent by the
application to the BGI Kernel, which in turn makes requests of the device
driver to actually manipulate the hardware.

A BGI device driver is a binary image; that is, a sequence of bytes without
symbols or other linking information. The driver begins with a short
header, followed by a vector table containing the entry points to the
functions inside. The balance of the driver comprises the code and data
required to manipulate the target graphics hardware.

All code and data references in the driver must be near (i.e., small model,
offset only), and the entire driver, both code and data, must fit within
64K. In use, the device driver can count on its being loaded on a paragraph
boundary. The BGI Kernel uses a register-based calling convention to
communicate with the device driver (described in detail below).

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson