Dec 182017
Simple program that detects video type, and passes to DOS via errorlevel. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
VIDTYPE.C | 4166 | 1184 | deflated |
VIDTYPE.DOC | 1192 | 562 | deflated |
VIDTYPE.EXE | 13793 | 13241 | deflated |
Download File VIDTYPE.ZIP Here
Contents of the VIDTYPE.DOC file
The code herein is specific to the MS Quick C v2.5 compiler. However,
being ANSI compatible, I'm sure it could easily be tweaked for Turbo C or
what-have-you.
The program detects the video card type and sets an errorlevel so that you
can branch to label in batch file (and load a driver based on the video
card type).
a la:
=================================
@echo off
REM boot disk AUTOEXEC.BAT
vidtype
if errorlevel 8 goto win_VGA
if errorlevel 4 goto win_EGA
... |------------------ could test for errorlevel 7 -> 4
actually. All would be TRUE and
:END indicate and EGA adapter.
=================================
OVERVIEW:
-----------------------------------------------
ADAPTER TYPES ERRORLEVELS
================================ ===========
Monochrome Display Adapter (MDA) 1
Color Graphics Adapter (CGA) 2
Enhanced Graphics Adapter (EGA) 4
Video Graphics Array (VGA) 8
MultiColor Graphics Array (MCGA) 10
Hercules Graphics Card (HGC) 20
Video Adpater Unknown! (VAU) 0
Enjoy.
being ANSI compatible, I'm sure it could easily be tweaked for Turbo C or
what-have-you.
The program detects the video card type and sets an errorlevel so that you
can branch to label in batch file (and load a driver based on the video
card type).
a la:
=================================
@echo off
REM boot disk AUTOEXEC.BAT
vidtype
if errorlevel 8 goto win_VGA
if errorlevel 4 goto win_EGA
... |------------------ could test for errorlevel 7 -> 4
actually. All would be TRUE and
:END indicate and EGA adapter.
=================================
OVERVIEW:
-----------------------------------------------
ADAPTER TYPES ERRORLEVELS
================================ ===========
Monochrome Display Adapter (MDA) 1
Color Graphics Adapter (CGA) 2
Enhanced Graphics Adapter (EGA) 4
Video Graphics Array (VGA) 8
MultiColor Graphics Array (MCGA) 10
Hercules Graphics Card (HGC) 20
Video Adpater Unknown! (VAU)
Enjoy.
December 18, 2017
Add comments