Date: Sat, 24 Mar 2001 10:30:24 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "chris tsui" Message-Id: <2950-Sat24Mar2001103024+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp AT delorie DOT com In-reply-to: (candeia99@hotmail.com) Subject: Re: Need help References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "chris tsui" > Date: Fri, 23 Mar 2001 13:44:03 -0800 > > Here's my problem. I am try to map physical memory for > my PCI card so that I can excises the 24bit DMA engine. > > So I did some research on the DJ FAQ and found I can > use XMS manager to allocate extended for me and map it > to linear. Why didn't you use the method described in section 18.7 of the FAQ? There's a skeleton of working code there that you could use as a starting point. It should have saved you all the grief of going through XMS and hitting a brick wall. > I know I can talk to the xms driver because I got the version > number right. The problem is I can never allocate any memory. > function 08 or 88 kept telling me all the extended memory > is allocated. Why?? > > I only have device=c:\dos\himem.sys See section 3.9 of the FAQ, specifically this fragment: - Memory managers provide an API for allocating extended memory called VCPI (the "Virtual Control Program Interface"). Using that API allows CWSDPMI to allocate only as much extended memory as is needed, leaving the rest for non-DJGPP programs, in case you invoke them from DJGPP programs. In contrast, without a memory manager, CWSDPMI will allocate all of the available extended memory to itself, leaving none of it to non-DJGPP programs. This consideration is especially important if you use some DJGPP program, like Bash or Emacs, as your primary system interface. For this reason, section 3.9 suggests to install a memory manager, to avoid this side effect. But I'd suggest to abandon this mess with XMS and use the DPMI calls as explained in section 18.7 of the FAQ.