delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/17/11:04:48

Date: Sun, 17 Oct 1999 14:39:12 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tim Updegrove <tdu AT enter DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Physical to Linear fails in MS-DOS
In-Reply-To: <3807d8ac.134142@news.enter.net>
Message-ID: <Pine.SUN.3.91.991017143832.25053d-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 Sat, 16 Oct 1999, Tim Updegrove wrote:

> The following sample program runs fine in a
> MS-DOS box in Windows95/98 but the call to
> __dpmi_physical_address_mapping fails under MS-DOS using cwsdpmi.exe.
> I have written other programs which use this same function under
> MS-DOS okay.

Charles already explained why does it fail.  What I would like to ask
is why did you need to use __dpmi_physical_address_mapping with a DOS
buffer in the first place?  You shouldn't need it with memory below
1MB at all.  Just allocate the buffer and use it.

>   segment = __dpmi_allocate_dos_memory((16384+15)>>4, &desc);

If all you need is 16KB, why not use the transfer buffer?  It is
already there, allocated and ready for use.  See section 18.2 of the
DJGPP FAQ for more details.

- Raw text -


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