Date: Mon, 10 Jun 1996 08:11:10 +0200 (IST) From: Eli Zaretskii To: J Adams Cc: djgpp AT delorie DOT com Subject: Re: Simplest way to access VGA memory In-Reply-To: <4paajc$hks_002@news.accessnv.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 8 Jun 1996, J Adams wrote: > Um, I'm just getting started with DJGPP, but I use WATCOM. > What is wrong with: > > char *gfx_screen = (char *)(0xa0000); Nothing wrong, except that it won't work in DJGPP. DJGPP uses GCC as its compiler, which doesn't know that certain addresses are supposed to magically arrive at peripheral devices, like the VGA. So the above generates code to write to an address that has high probability to be outside your address space, and this isn't allowed in a protected-mode environment. The DJGPP FAQ (v2/faq200b.zip from the same place you get DJGPP) describes how to accomplish this in DJGPP in section 18.4.