PRB: VGA Recognized as EGA on Some Dual-Monitor Configurations

ID Number: Q72790

6.00 6.00a 6.00ax | 6.00 6.00a

MS-DOS | OS/2

Summary:

SYMPTOMS

In Microsoft C versions 6.0, 6.0a, and 6.0ax, the graphics

functions _getvideoconfig() and _setvideomode() in the Microsoft C

run-time library may not function as expected on a machine with

both VGA and monochrome display adapters installed. This is the

result of a problem in the VGA BIOS and is not a problem with the

graphics functions themselves. The graphics functions call Int 10H

Function 1B, and this function returns an incorrect value with a

dual-monitor configuration.

This problem occurs with the VGA BIOS from IBM as well as any of

those from other vendors that are closely compatible to the IBM.

CAUSE

In the VGA BIOS, Int 10 Function 1B is used to retrieve the current

video configuration. Two of the fields this call returns are the

active and inactive display codes. With the IBM VGA BIOS, this

function always returns EGA as the primary adapter and no second

adapter. Unfortunately, a video BIOS that is true to the IBM

implementation will exhibit the same behavior. For instance, the

problem occurs with the VGA BIOS on some Northgate motherboards and

with the Trident VGA adapters.

RESOLUTION

The easiest workaround in this case is to contact the manufacturer

of the video BIOS and request an update. In some cases, this may be

in the form of a TSR (terminate-and-stay resident program) that

traps the calls to Int 10H Function 1Bh and returns the correct

values.

If an update is not possible (or not yet available) and you need to

write code that relies on the type of display adapters installed,

Int 10H Function 1A can be used instead. This function does return

the correct values for the primary and secondary adapters. If you

do not have access to the source code at the level where you can

change the interrupt call, you may want to look into creating an

interrupt service routine where you trap Int 10H and change the

values yourself.

More Information:

The GRAPHICS.LIB library that ships with Microsoft languages was

updated to handle this occurrence beginning with the version included

in the FORTRAN version 5.1 package.

Additional reference words: 6.00 6.00a 6.00ax