Article View: comp.os.msdos.programmer
Article #631Re: Detecting VGA
From: Ralf Brown
Date: Thu, 09 Apr 1992 03:47
Date: Thu, 09 Apr 1992 03:47
36 lines
1866 bytes
1866 bytes
In article <bmej69.bn6@wang.com> smayo@wang.com (Scott Mayo) writes:
}[...]
}if the result is al == 12h, it is a VGA. If not...
}
}[...]
}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.
And if it fails the tests,
set AH to 0Fh
invoke INT 10h
if AL == 7, assume MDA/HGC and set display address to B000h
else assume CGA
One final step will make text-based applications compatible with DESQview
and with Memory Commander's/All Charge Card's relocation of the video
memory:
After determining the display type and display address (B800h for color),
set ES to the display address segment
set DI to 0000h
set AH to FEh
invoke INT 10h
store the returned ES:DI as the start address of video memory
This last call will also make the program compatible with non-full-screen
operation under TopView, TaskView, OmniView, and MS Windows if the program
additionally makes calls to INT 10h/AH=FFh to let the environment know
about screen updates.
--
{backbone}!cs.cmu.edu!ralf ARPA: RALF@CS.CMU.EDU FIDO: Ralf Brown 1:129/26.1
BITnet: RALF%CS.CMU.EDU@CARNEGIE AT&Tnet: (412)268-3053 (school) FAX: ask
DISCLAIMER? Did | Hansen's Library Axiom: The closest library doesn't
I claim something? | have the material you need.
Technical Details
Message-ID:
<1992Apr09.034720.52532@cs.cmu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!mips!darwin.sura.net!udel!rochester!cantaloupe.srv.cs.cmu.edu!ralfReferences:
<1992Apr4.142204.3541@ucsu.Colorado.EDU> <bmej69.bn6@wang.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!mips!darwin.sura.net!udel!rochester!cantaloupe.srv.cs.cmu.edu!ralf From: ralf+@cs.cmu.edu (Ralf Brown) Subject: Re: Detecting VGA Message-ID: <1992Apr09.034720.52532@cs.cmu.edu> Date: Thu, 09 Apr 92 03:47:20 GMT Organization: School of Computer Science, Carnegie Mellon Nntp-Posting-Host: b.gp.cs.cmu.edu References: <1992Apr4.142204.3541@ucsu.Colorado.EDU> <bmej69.bn6@wang.com> Lines: 36