home *** CD-ROM | disk | FTP | other *** search
- { EGAcheck - check if EGA is in use ver 1.3, 11-10-86 }
- { If you want faster results with an EGA and also will use a CGA, this function
- will check for existing EGA BIOS and use the faster loops that don't wait for
- retrace as needed on the CGA. }
-
- var ToEGA: Boolean; { Assign the result of EGAcheck to ToEGA as an }
- { initializing routine in your program!!! }
-
- Function EGAcheck: Boolean;
- begin
- Inline(
- $B4/$12 { MOV AH,$12 ;Set AH for alt select}
- /$BB/$10/$FF { MOV BX,$FF10 ;Set BX for EGA info}
- /$CD/$10 { INT $10 ;Interrupt}
- /$80/$EF/$FF { SUB BH,$FF ;Check if BH changed}
- /$74/$02 { JZ NoEGA ;BH=false if no EGA}
- /$B7/$01 { MOV BH,$01 ;Set BH=true ($01)}
- /$88/$7E/$04 {NoEGA: MOV [BP+$04],BH ;EGAcheck: $01 or $00}
- );
- end;