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

Date: Thu, 9 May 1996 17:54:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Hafiz Awang Pon <004277a AT iceberg DOT acadiau DOT ca>
Cc: djgpp AT delorie DOT com
Subject: Re: problem with djgppv2
In-Reply-To: <3190ed2f.0@131.162.2.91>
Message-Id: <Pine.SUN.3.91.960509174756.20870B-100000@is>
Mime-Version: 1.0

On 8 May 1996, Hafiz Awang Pon wrote:

> void transfer_screen(void) {
> 
>    lcopy(Virtual_Screen, 0xd0000000, 16000L);
>    }

You are trying to write to the video memory by using an absolute address. 
This doesn't work under DPMI (it didn't even work in v1.x when go32 was
run in DPMI mode, e.g.  under Windows).  The DJGPP FAQ list
(v2/faq200b.zip from the same place you get DJGPP) explains this problem
in section 10.1 and points you to the possible solutions. 

Btw, there is no need to reinvent the wheel: a function that does exactly 
what you need already exists in the DJGPP library.  It is called 
`movedata', is at least as fast as your code, and even existed in v1.x.  
I suggest you look it up in the libc on-line docs.  The FAQ also explains 
a bit how to use that function.

- Raw text -


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