Date: Sun, 17 Oct 1999 14:39:12 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Tim Updegrove 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.