www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/11/18:52:52

From: Robert Gorichanaz <wraith AT hollywood DOT cinenet DOT net>
Subject: Re: Allocating DOS memory ???
To: dj AT delorie DOT com (DJ Delorie)
Date: Sun, 11 Feb 1996 15:34:19 -0800 (PST)
Cc: djgpp AT delorie DOT com
MIME-Version: 1.0

> 
> 
> > and then fread the file in using "location". (sorry for the rough code, 
> > I'm typing it from memory - don't have multiple windows)
> 
> The DOS allocation stuff doesn't return a regular pointer, it returns
> an offset into DOS memory.  You must use one of the dos access
> functions (like dosmemput) to access it.  fread() cannot access dos
> memory directly.
> 
Ok.  What I'm trying to load is a real-mode sound card driver.

So, would you then recommend that I

	1. malloc() a chunk of memory
	2. fread the file in
	3. allocate dos memory
	4. dosmemput the data into conventional memory.

Would that work, or is there a more straightforward method?

-=bob=-

- Raw text -


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