Mail Archives: djgpp/1996/05/27/06:30:56
On Mon, 27 May 1996, Samuel Vincent wrote:
> > The villain is the following line:
> >
> > > unsigned char *video_buffer = (unsigned char *)0xe00a0000L;
> >
>
> 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. ;)
Not necessarily true, since memory mapping registers of the CPU might be
set up in such a way that the above address is mapped to the video RAM.
In fact, DJGPP v1.x did just that, which probably is the cause that code
was ever written in the first place. Under DPMI this cannot be done,
because the DPMI host takes over the memory mapping, so in DJGPP v2 this
doesn't work.
- Raw text -