www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/07/13:09:12

Date: Sun, 7 Nov 1999 17:10:32 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tim Updegrove <tupdegrove AT lucent DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Allocating DOS memory in Windows
In-Reply-To: <38221076.966C6FFD@lucent.com>
Message-ID: <Pine.SUN.3.91.991107170954.12805S-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 4 Nov 1999, Tim Updegrove wrote:

> As I indicated below, just allocating DOS memory (and passing the segment to
> the DMA hardware and using the selector in the program) works fine when
> booting into MS-DOS.  The DMA hardware fetches the correct info.  However,
> running the same exact executable in a MS-DOS box under Windows, the DMA
> hardware doesn't fetch the correct info in memory which was first written by
> the program.  The DMA hardware fetches the same address in both cases but,
> under Windows, the data that the program wrote isn't present (but is present
> when booting to MS-DOS).

Perhaps you didn't program the DMA controller correctly.  Windows
usually works behind the scenes to make DMA work as if you were
running on DOS.

> That is, the selector returned from allocating DOS memory under
> Windows doesn't appear to point to the same data as the returned segment.

Please explain this in more detail.  How exactly did you arrive at the
conclusion that the selector and the segment don't point to the same
memory?

> As indicated below, steps 2-5 work with Windows (but don't work when booting
> to MS-DOS because the memory is already mapped) but I would like one
> solution to work in both environments.

I think this is due to some bug.  But even if not, it should be easy
to find out from within the running program whether you run on
Windows, and employ the appropriate solution.

- Raw text -


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