delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/27/06:25:11

Date: Mon, 27 May 1996 03:15:12 -0700 (PDT)
From: Samuel Vincent <svincent AT cs DOT sonoma DOT edu>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: "Jeremy W. Deats" <jeremy AT neosoft DOT com>, djgpp AT delorie DOT com
Subject: Re: Simple mode 13h stuff... why doesn't this work?
In-Reply-To: <Pine.SUN.3.91.960527081838.9483E-100000@is>
Message-ID: <Pine.SUN.3.90.960527031335.29517A-100000@zippy>
MIME-Version: 1.0

On Mon, 27 May 1996, Eli Zaretskii wrote:

> On Sun, 26 May 1996, Jeremy W. Deats wrote:
> 
> >  Can anyone tell me why this doesn't work?
> 
> The villain is the following line:
>  
> > unsigned char *video_buffer = (unsigned char *)0xe00a0000L;
> 
> and your belief that you can just get away with poking an arbitrary
> address like this: 
> 
> >   for (i=0;i<64000;i++)
> >    { video_buffer[i]=color; }
> 
> DJGPP is a protected-mode environment which won't allow you to write to 
> any address you want, unless you ask nicely.
> 
> The DJGPP FAQ list (v2/faq200b.zip from the same place you get DJGPP) has 
> full details, beginning at section 10.1.


Well..  actually, that's not even the address he really wants
to address. :)   That's the 0xe00a0000'th byte from the beginning
of your djgpp program's data segment.  (Which most likely isn't in 
existence unless you've allocated a HUGE amount of memory. ;)

-Sam

- Raw text -


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