delorie.com/archives/browse.cgi | search |
From: | "Jonathan Villani" <jonathan DOT villani AT videotron DOT ca> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | memcpy function or dosmemput(copying dpmi memory to DOS memory) |
Lines: | 39 |
X-Newsreader: | Microsoft Outlook Express 4.72.3007.0 |
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3007.0 |
Message-ID: | <11n22.1121$4S.4437@weber.videotron.net> |
Date: | Wed, 11 Nov 1998 16:08:27 -0500 |
NNTP-Posting-Host: | 207.253.100.188 |
X-Complaints-To: | abuse AT videotron DOT net |
X-Trace: | weber.videotron.net 910818493 207.253.100.188 (Wed, 11 Nov 1998 16:08:13 EDT) |
NNTP-Posting-Date: | Wed, 11 Nov 1998 16:08:13 EDT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
First I would like to thank Eli Zaretskii and Mark Reed for helping me in getting rid of the near pointers for my sound player. Since it's the first time I'm allocating DOS memory under DJGPP I have a lot of problems with finding the right function to do the job. I've been told to use dosmemput but the syntax is: dosmemput(const void *buffer,int length,int offset) this transfer dpmi memory (sound samples allocated with malloc) to DOS memory (DMA buffer) right?? Ok if I am right about this tranfer, the const void *buffer sould be replaced with my pointer to sound data (data allocated with malloc) But how do I find the offset of the DMA buffer (DOS memory) I know the formula : offset = segment * 16 + offset; Do this code is right? newoffset = info.rm_segment*16 + (offset where I want to start the copy in my DOS memory) Because in other codes I see that their using the memcpy function (Watcom source code of SoundBlaster's Hardware programming guide). Do I need to use memcpy or dosmemput ? And my second question is : can we lock DOS memory. I'm pretty sure that it doesn't exist in DOS and it is for protected mode only but I want to be 100% sure about that one. I don't want my program to hang the computer if it swap. Thank you very much! Jonathan Villani jonathan DOT villani AT videotron DOT ca
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |