[comp.os.msdos.programmer] Determining Video Subsystem Type ...

android@ccwf.cc.utexas.edu (Andy Wilks) (06/18/91)

In article <1991Jun14.133809.14503@eng3.sci.com> felton@eng3.sci.com (Ed Felton) writes:
)How can I, without using anything DOS'ish, (BIOS calls or memory reads only),
)determine the Video Subsystem that is in place?

Look at the little label on the back of the monitor...
 
>I have a code fragment from "USER INTERFACES IN C" [Mark Goodwin]
>that detects MDA, CGA, and EGA/VGA.

Any code you have has to generate a BIOS interupt to determine the video
display.  That is how you communicate with the hardware.  Of course, if
you insist on NOT using interupts you could query the ports yourself.
 
)I would like to go further, and be able to break the EGA/VGA down into 
)EGA or VGA, and also would like to be able to detect any others like
)SVGA.
 
>Any help in this is greatly appreciated.  
>Source code, Pseudocode, Smoke signals all accepted.
> Thanks in Advance
 
>Ed Felton
>-- 
>Ed Felton
>PC Diagnostics Guy                   _H_a_v_e_ _._s_i_g_,_ _w_i_l_l_ _t_r_a_v_e_l_.
>SCI Systems Inc.
>InterNet: _f_e_l_t_o_n_@_s_c_i_._c_o_m  The late MA Bell: W:_(_2_0_5_)_ _8_8_2_-_4_2_7_0   H:_(_2_0_5_)_ _7_2_5_-_4_8_7_9


/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
*   I don't express opinions, I just follow orders...             (___)   *
/                                                                 (o o)   /
*   Andy Wilks                   One of the few .sig's->   /-------\ /    *
/   andy@fiskville.mc.utexas.edu   with ASCII livestock.  / |     ||O     /
*   android@ccwf.cc.utexas.edu                           *  ||,---||      *
/   University of Texas at Austin                           ^^    ^^      /
*   copyright (c) 1934,1942,1961,1990,1991                    BEVO        *
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
 

Gary_Wong@kcbbs.gen.nz (Gary Wong) (06/20/91)

Well I'm no expert on this, and can't help you for detecting a super 
vga, but it doesn't look like anybody's replied so here's some assembly 
that will detect what you want through the BIOS:
Call function $1A of interrupt $10 with AL set to 0, and you will get 07 or $0
$07 or $08 returned in BL if a VGA is active.  You will also get $0A 
or $0B if they have an MCGA.  If you get any other result, or if AL 
is not set to $1A, then check for other cards:

Call INT $10 with AH=$12, BL = $10.  If BL is returned as $10, they 
don't have an EGA, so keep looking...

Call  INT $10 , AH = $0F, and if AL is 7 then they have either a mono 
adapter or a Hercules.

Otherwise they could have anything.  Probably a CGA, but possibly something 
like the built in PCjr graphics.  

Don't count on this working.  I have used it before & it works on standard 
stuff, but it won't detect super vga.  Good luck anyway.

Gary.