Coder's Guild Mailing List

Re: VGA Programming

Posted by Morgan Terry on 1999-10-13

I am programming in C.  I have my compiler (Borland C++ 5.02) set up for
a DOS executable, and I don't know what mode.  Whatever is default I
guess.  I am new to this kind of stuff, so any info you can provide
would be much appreciated.

Catalin Ionescu wrote:
> 
> You didn't specify in what language are you trying to program. Also you
> didn't specify in what CPU mode, e.g. real, flat or protected mode.
> Assuming the real mode, the address for VGA memory buffer is 0xA000:0000,
> with one byte for each pixel on-screen.
> For protected mode, depends on your environment, if you are allowed to do
> memory-writes and where VGA memory-map is.
> For flat mode, the address for VGA memory-map is 0xA0000000.
> 
> Now, if you're programming a plain DOS application, it is safe to assume
> that you're in real mode (or this is emulated for you). If you're
> programming a Windows application, forget about direct addressing of
> memory-map and use instead Windows API functions.
> 
> 
> Catalin Ionescu
> cata@xxxxx.xx
> 
> > 

-- 
Morgan
morgan@xxxxxxxxxxx.xxx

Clever signature goes here
Sponsored by Wrox Press - www.wrox.com. Programmer to Programmer (TM)