www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/16/01:26:47

Date: Thu, 16 May 1996 08:22:46 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Jan Louwerens <jlouwere AT galaxy DOT csc DOT calpoly DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: Q: How to handle 64k segments?
In-Reply-To: <4nd9db$k66@waldorf.csc.calpoly.edu>
Message-Id: <Pine.SUN.3.91.960516082038.4526F-100000@is>
Mime-Version: 1.0

On 15 May 1996, Jan Louwerens wrote:

> : I have the following question concerning DJGPP (v1.12mt5 and v2):
> : What must I do to copy a 64k segment (starting at DC000) into
> : an array with the size of [256][256].
>
> I believe DJGPP runs in protected mode with 32 bit segments, not 16 bit.
> Just try dereferencing pointers to copy the whole 64k.
> for (Index = 0; Index < 65536; Index++) {
>    *(Dest + Index) = *(Source + Index);
> }

Please don't post untested code without at least saying so.  The above 
won't work: you can't dereference an absolute address such as 0xdc000 
without a triggering protection violation.

- Raw text -


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