X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f NNTP-Posting-Date: Mon, 17 Aug 2009 19:51:27 -0500 From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: freedos and cwsdpmi with djgpp under Linux? Date: Mon, 17 Aug 2009 19:51:19 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original Message-ID: Lines: 23 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 64.91.192.48 X-Trace: sv3-FntPokabw+QmcCNym2VeW5Eo744sBOlfEeDbPzTr3nl3FwlXm6S4HCx9yO/SvPf4D2hvbNE7NNZl75R!xwnmcMGbCW4haZ+SvQ3CRmF+3aHWtcmhHq0DIHMHoS1Ru1Zrfsq+wEDbws61NjrrDqpX0i85Uy8z!ty17693Fn7s7GJor64NNkg8TYBECnss= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 X-Original-Bytes: 2080 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > regs.x.ax = 0x0900; /* Allocate extended memory block */ > regs.x.dx = size_pg_align / XMS_BLOCK; > __dpmi_simulate_real_mode_procedure_retf(®s); > it fails. Can anyone shed some light on this? cwsdpmi allocates the largest XMS memory block available when it starts up. If there is only one block, it takes it all. If you absolutely need an XMS block, you need to "prepare" for it before running CWSDPMI (such as allocate the block you need, allocate a second tiny block, release the first block). If you need an XMS block for another purpose (such as a DMA buffer) - consider using DOS memory if it is large enough, or just using a DJGPP allocated memory block and using something like the code in http://clio.rice.edu/djgpp/cwsdma.zip (or cwsdma2.zip, I don't remember the difference anymore) to get the physical addresses of the associated memory blocks.