www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/30/09:40:11

Date: Wed, 30 Aug 1995 12:13:37 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Timothy Wilson <wilsont AT rahul DOT net>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Graphics in v2.0

On 30 Aug 1995, Timothy Wilson wrote:

> I don't do any of that, for both 1.6 and 2.0 I've used:
> char * screen
> 
> screen=(char*)0xa0000;
> 
> screen[x+y*320]=somecolor;
> 
> As long as I set stuff up with a INT 10 call it works fine, no need
> to muck with this near/far pointer crapola. *bleh* This is GCC after all, 
> not DOS. :)

What's 1.6?  There ain't no DJGPP 1.6, AFAIK.  Anyway, I don't understand 
how can it work with DJGPP v2.0 (or even 1.12 in DPMI mode), because the 
video RAM is outside your address space, so your program will GPF when 
you try to access that address (that's what protected mode is all 
about).  This is why you still need far pointers even in 32-bit mode.  In 
DJGPP v1.x in non-DPMI modes, the video memory was mapped to a special 
range of addresses in your address space, that's why it worked, but in 
DPMI mode it won't.  What INT 10h call can settle this?  Can you 
elaborate or give a sample code which works in v2.0/DPMI mode?  Thanks.

- Raw text -


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