🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #622

Re: Detecting VGA

#622
From: Scott Mayo
Date: Wed, 08 Apr 1992 18:25
24 lines
1104 bytes
holmesda@spot.Colorado.EDU (ASTAROTH) writes:

>	This time I need to know how to detect whether the current vidcard
>is CGA, EGA, or VGA.  Can someone send me the assembly needed to perform
>such a feat?  Please?  Or at least point me in the right direction?

set ah to 12h
set al to 0
set bl to 32h
invoke int86 10h
if the result is al == 12h, it is a VGA. If not...

ah/ 12h
bl/ 10h
invoke int86, 10h
if the result in bl is 10h, it is not an EGA. If it is less than 3,
it is a small EGA (less than 256K memory)
if bh comes back nonzero, it is not a color monitor.

I don't know how to ask for a CGA, but if it flunks these tests you could
just *assume* CGA.
--
These are only my opinions.  You should hear my convictions.
smayo@wang.com
Technical Details
Message-ID: <bmej69.bn6@wang.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ulowell!wang!smayo
References: <1992Apr4.142204.3541@ucsu.Colorado.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!ulowell!wang!smayo
From: smayo@wang.com (Scott Mayo)
Subject: Re: Detecting VGA
Organization: Wang Labs, Lowell MA, USA
Date: Wed, 08 Apr 92 18:25:19 GMT
Message-ID: <bmej69.bn6@wang.com>
References: <1992Apr4.142204.3541@ucsu.Colorado.EDU>
Sender: news@wang.com
Lines: 24