What is the simplest way in C to distinguish the following types of
video cards: Mono, Hercules, CGA, EGA, VGA ?
I do not care to identify subclasses of the above. So far, I have managed
a routine that breaks the above set into subsets (Mono, Hercules), (EGA, VGA),
and (CGA). So how do I tell an EGA from a VGA and the Hercules from the Mono
card?
A related question: How do the Dos and Bios interrupts behave when they do
not support a given subfunction? That is, suppose computer A supports bios
INT 10 functions 00 to 0F and Computer B supports those plus 10 to 1F. How
will computer A behave if I sent it an INT 10 function 1F? Will it just set
the carry flag and return? It seems to me that this kind of question comes up
when delaing with different computers. (By computers, I mean PC clones (XT,
AT, 386, 486) I am not trying to compare apples and oranges, just oranges.)
Thanks!
--John
The simplest & easiest way is to use the _getvideoconfig function that
return the graphics configuration in a structure containing, among
other information, the:
- Current video mode
- Active display adapter
- Active display monitor
- Adapter video memory
Warning: I only use MS-C & I don't know if the same is valid for Turbo
C or any other; I guess so.
There's useful & interesting information related to this topic in a
CD-ROM containing documentation published by Microsoft Press
(Video, MS-DOS Encyclopedia, Inside OS/2, MS-DOS Advanced, etc.) but
I'm not sure now if all examples are in Assembly language.
Manuel
========================================================================
Manuel Socarras Reyes |
Tampere University of Technology |
Signal Processing Laboratory | No he tenido tiempo de buscarme
P.O. Box 553 | mi frasecita, I'm sorry.
33101 Tampere, Finland |
INTERNET: man...@cs.tut.fi |
========================================================================