www.delorie.com/djgpp/v2faq/faq157.html | search |
Q: I want to use DMA, but I don't know how to get the physical address of the buffer I allocate for that purpose.
__dpmi_get_segment_base_address
library function and add it to the address of your buffer, but the resulting address is a logical address, translated into a physical address by the
memory-mapping unit which is part of the CPU. You have two alternatives to get the physical address of your buffer:
__dpmi_allocate_dos_memory
. This method has a disadvantage of using conventional memory which is at a premium, and is therefore generally ill-suited for large DMA buffers.
EMM386
or QEMM
, to run, since only memory managers and Windows support the VDS API. In other words, if you use VDS, your program
won't work on a system where CWSDPMI(Note: CWSDPMI has an experimental VDS support in its sources, but the distributed binary was compiled without it. Contact
Charles Sandmann if you want to try to enable VDS support in CWSDPMI.) is used as the DPMI server, allocating memory by raw XMS calls or via HIMEM.
webmaster donations bookstore | delorie software privacy |
Copyright ⌐ 1998 by Eli Zaretskii | Updated Sep 1998 |
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)