Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!oliveb!sun!burgundy!jborza From: jborza%burgundy@Sun.COM (Jim_Borza) Newsgroups: comp.sys.ibm.pc Subject: Re: Fast video routines... Message-ID: <81802@sun.uucp> Date: 15 Dec 88 17:14:54 GMT References: <45714@yale-celray.yale.UUCP> Sender: news@sun.uucp Lines: 25 In article <45714@yale-celray.yale.UUCP>, spolsky-joel@CS.Yale.EDU (Joel Spolsky) writes: > To my chagrin I have discovered that the "fast-video" routines Turbo-C > uses are not fast enough for my needs, so I'm writing my own. Here's > what I think I have to do: > > - find out if the display is monochrome using BIOS Int. 11 > - if so, display starts at B000:0000 > - otherwise, display starts at B800:0000 > > Are there any hardware combinations where this _won't_ work? In other > words - are there any common display adapters that have their video > memory elsewhere? and is Int.11 reliable? > > Thanks in advance, > Joel Spolsky Better to use int 16h (ah=0Fh). That'll get the *current* video mode (the user may have >1 Adapter). If the return is Mode=7, the display is mono- chrome and the display segment is B000:0. If it's anything else, you can force it to Mode=3 with int 16h (ah=0) and use B800:0 (This is assuming you are using 80X25 TEXT mode - graphics is a tad more complex). As al- ways, it is polite to store the mode returned from the inquiry and restore the original mode on exit. Monochrome is always Mode=7. All standard graphics adapters will accept Mode=3. Jim Borza