X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 10.99.67.66 with SMTP id q63mr5898906pga.83.1503053450434; Fri, 18 Aug 2017 03:50:50 -0700 (PDT) X-Received: by 10.31.153.196 with SMTP id b187mr78832vke.14.1503053450328; Fri, 18 Aug 2017 03:50:50 -0700 (PDT) Newsgroups: comp.os.msdos.djgpp Date: Fri, 18 Aug 2017 03:50:50 -0700 (PDT) Complaints-To: groups-abuse AT google DOT com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=89.177.38.55; posting-account=Q0wMHAoAAADjYrghh94FTf6YnbpTqZgp NNTP-Posting-Host: 89.177.38.55 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: 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 10:50:50 +0000 Content-Type: text/plain; charset="UTF-8" Bytes: 1917 Lines: 9 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I need to do one IDE busmaster DMA tranfer. For this purpose I need a 512+8B buffer in physical memory - I have to fill bussmaster PDRT IO register with physical address of buffer where I put PDR entry and data. So it seems to me the easiest way is to use __tb, where I can copy my structures and data via dosmemput and then start DMA transfer by writting to IO registers. But I don't know how long my data in transferbuffer? Is it shared for some DJGPP functions like if I do a printf or anything calling a DOS it may get overwritten? Or should I rather allocate dos memory block separately? The DMA buffer must fulfil 2 conditions: 1) phys. address must be word aligned - probably OK, AFAIK dosmem is allocated in paragraphs 2) buffer cannot cross over 64kB boudary, e.g. FFF0h + size 512B is wrong, FE00h + size 512B is OK. Should I care about 2nd condition myself?