cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/11/16:30:13

Date: Wed, 11 Nov 1998 16:15:04 -0500 (EST)
Message-Id: <199811112115.QAA00829@indy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <11n22.1121$4S.4437@weber.videotron.net>
(jonathan DOT villani AT videotron DOT ca)
Subject: Re: memcpy function or dosmemput(copying dpmi memory to DOS memory)
Reply-To: djgpp AT delorie DOT com

> dosmemput(const void *buffer,int length,int offset)
> 
> this transfer dpmi memory (sound samples allocated with malloc) to DOS
> memory (DMA buffer)   right??

Yes.

> 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)

Yes.

> 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?

For dosmemput, yes.

> 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 ?

Of those two, dosmemput.  Only it knows about the special dos segment.
memcpy can only copy between two application-memory buffers.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019