www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/10/01:18:14

Date: Mon, 10 Jun 1996 08:11:10 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: J Adams <tCM AT accessnv DOT com>
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: <Pine.SUN.3.91.960610080627.2508C-100000@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019