[comp.lang.pascal] Detecting EGA/VGA presence

jc58+@andrew.cmu.edu (Johnny J. Chin) (12/12/88)

Does anyone out there know how to detect to see if there is an EGA or VGA
adapter present in a computer?

How about CGA, Monochrome, or Hercules?  Does determining the present video
mode tell me enough to assume that one of these display adapters are present?

If you do, could you please send me the sub-routine which will do this for me?
It doesn't matter if its in Assembly, C or Pascal.

If you curious why I need this, I am writing a program which has to perform
differently for each display mode (particularly, EGA and VGA).

Thanks in advance for all replies.

                                        -- J. Chin (a.k.a. Computer Dr.)
 xxxxxxxxxx
xxx  xxx  xx  ------------------ Carnegie Mellon University ------------------
xxx  xxx  xx  4730 Centre Ave. #412     ARPAnet: Johnny.J.Chin@andrew.cmu.edu
xxxxxxxxxxxx  Pittsburgh, PA  15213     BITnet:  jc58@andrew.BITNET
x xxxxxxxx x  (412) 268-8936            UUCP: ...!harvard!andrew.cmu.edu!jc58
xx        xx  ----------------------------------------------------------------
 xxxxxxxxxx   Smile!

Disclaimer:   The views expressed herein are STRICTLY my own, and not CMU's.

garnett@a.cs.okstate.edu (John Garnett) (12/14/88)

From article <17772@adm.BRL.MIL>, by jc58+@andrew.cmu.edu (Johnny J. Chin):
> 
> Does anyone out there know how to detect to see if there is an EGA or VGA
> adapter present in a computer?
> 
> How about CGA, Monochrome, or Hercules?  Does determining the present video
> mode tell me enough to assume that one of these display adapters are present?

If you are using Borland's Turbo Pascal 5.0 (4.0 too?) or Turbo C 1.5+ you
can use the Borland Graphics Interface (BGI) to automatically detect what
type of video adapter is present.  I've found the BGI to very time saving.
You can write one program that will work with almost any video adapter / 
monitor combination.  You don't even have to bother with writing different
segments of code to deal with different monitors.

John Garnett                           Computing and Information Sciences
                                       Oklahoma State University
Email: garnett@a.cs.okstate.edu        Stillwater, Oklahoma

garnett%A.CS.OKSTATE.EDU%CUNYVM.CUNY.EDU@cunyvm.cu (John Garnett) (12/21/88)

From article <17772@adm.BRL.MIL>, by jc58+@andrew.cmu.edu (Johnny J. Chin):
>
> Does anyone out there know how to detect to see if there is an EGA or VGA
> adapter present in a computer?
>
> How about CGA, Monochrome, or Hercules?  Does determining the present video
> mode tell me enough to assume that one of these display adapters are present?

If you are using Borland's Turbo Pascal 5.0 (4.0 too?) or Turbo C 1.5+ you
can use the Borland Graphics Interface (BGI) to automatically detect what
type of video adapter is present.  I've found the BGI to very time saving.
You can write one program that will work with almost any video adapter /
monitor combination.  You don't even have to bother with writing different
segments of code to deal with different monitors.

John Garnett                           Computing and Information Sciences
                                       Oklahoma State University
Email: garnett@a.cs.okstate.edu        Stillwater, Oklahoma