[comp.sys.ibm.pc] Fast video routines...

spolsky-joel@CS.Yale.EDU (Joel Spolsky) (12/15/88)

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?

Yes, I know about snow; I will give users the ability to switch on
snow-protection.

Thanks in advance,

+----------------+----------------------------------------------------------+
|  Joel Spolsky  | bitnet: spolsky@yalecs.bitnet     uucp: ...!yale!spolsky |
|                | internet: spolsky@cs.yale.edu     voicenet: 203-436-1483 |
+----------------+----------------------------------------------------------+
                                                      #include <disclaimer.h>

jborza%burgundy@Sun.COM (Jim_Borza) (12/16/88)

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

jborza%burgundy@Sun.COM (Jim_Borza) (12/16/88)

In article <81802@sun.uucp>, jborza%burgundy@Sun.COM (Jim_Borza) writes:

> 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
> 

AIEEEEE!  I meant to say "int 10h"  or "int 16d".

Please hold the flames - I know, I know!

Jim Borza