Mail Archives: djgpp/1999/10/17/11:04:48
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 -