From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp Subject: Re: Physical address from array ? Not a clue! Date: Tue, 14 Oct 1997 13:54:32 Organization: Aspen Technology, Inc. Lines: 13 Message-ID: <34437998.sandmann@clio.rice.edu> References: Reply-To: sandmann AT clio DOT rice DOT edu NNTP-Posting-Host: nboal2.dmccorp.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > lets say "fred[70000]" how do you get the PHYSICAL address into an int so > you can pass that to, say, a dma chip which is ready to accept a 32-bit > address. You don't. The physical addres may change from one moment to another. The memory may be swapped to disk, or not even physically contiguous due to the paging hardware. The easiest thing to do is to use the 1Mb region for all your DMA buffers, since it is mapped 1:1. You can also use the XMS routines to allocate and lock a buffer if using a memory manager which supports this. If you plan to limit execution to a certain environment (cwsdpmi, etc) you may be able to access the page tables and determine what you need to know.