FILE I/O & SLOW WINDOWS

Tony Catone catone at dsl.cis.upenn.edu
Sat Feb 27 08:01:11 AEST 1988


In article <105 at richp1.UUCP> kk at richp1.UUCP (PUT YOUR NAME HERE) writes:
>
>Monochrome screen memory begins at 0xB000:0x0000 (segment:offset)
>and color memory begins at 0xB800:0x0000 (segment:offset).  All you have
>to do is set a pointer to the beginning of the right kind of memory 
>(you can find out if you have a color or monochrome from a BIOS call,
>but I don't know which offhand) and do a memcpy(buf,screen,4000) to
>save the entire screen and memcpy(screen,buf,4000) to restore it.

Be forewarned that the BIOS call to return the current display mode
(mono or color) is broken in the early BIOS versions of many PC
compatibles.  This once gave me quite a headache on my Leading Edge
Model M, until I tracked down what exactly was wrong.  The more 
reliable way to obtain the video mode is to read the value in the
BIOS low memory data table yourself.  The exact memory address is
commonly obtainable; send me mail if you can't find it and want it.

					- Tony
					  catone at dsl.cis.upenn.edu
					  catone at wharton.upenn.edu



More information about the Comp.lang.c mailing list