X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 10.107.6.232 with SMTP id f101mr6707917ioi.30.1503080023306; Fri, 18 Aug 2017 11:13:43 -0700 (PDT) X-Received: by 10.31.136.77 with SMTP id k74mr65135vkd.4.1503080023248; Fri, 18 Aug 2017 11:13:43 -0700 (PDT) Newsgroups: comp.os.msdos.djgpp Date: Fri, 18 Aug 2017 11:13:42 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse AT google DOT com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=89.24.106.115; posting-account=Q0wMHAoAAADjYrghh94FTf6YnbpTqZgp NNTP-Posting-Host: 89.24.106.115 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2fd7d93e-3a52-47ef-97d4-dc0208565e62@googlegroups.com> Subject: Re: Can I use transferbuffer temporarly a for short DMA transfer? From: "RayeR (glaux AT centrum DOT cz) [via djgpp AT delorie DOT com]" Injection-Date: Fri, 18 Aug 2017 18:13:43 +0000 Content-Type: text/plain; charset="UTF-8" Bytes: 2045 Lines: 12 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v7IIU2op030289 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 > "[The transfer] buffer is used for all DOS/BIOS services supported by > DJGPP, it resides in conventional memory, and is allocated by the > startup code." > http://www.delorie.com/djgpp/v2faq/faq18_2.html Yes I read the DJGPP FAQ. I'm not sure what all DOS/BIOS serviuces are used by what DJGPP libc function. It seems that printf is destrying my transferbuffer data so I rather use __dpmi_allocate_dos_memory. OK, there's no specified how this allocated memory is aligned and if the allocator prevents crossing 64kB boundary which is required by busmaster DMA - probably I have to take care myself and allocate 2-times of memory than I need and check the physical address and if it cross the boundary then dont use beginning of the buffer but higher address just behind the boundary...