www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/31/01:50:59

Date: Wed, 31 Jul 1996 08:47:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Joonas W N Reynders <reynders AT cc DOT helsinki DOT fi>
Cc: djgpp AT delorie DOT com
Subject: Re: return type of malloc?
In-Reply-To: <4thu6e$nsr@oravannahka.Helsinki.FI>
Message-Id: <Pine.SUN.3.91.960731084323.1793L-100000@is>
Mime-Version: 1.0

On 29 Jul 1996, Joonas W N Reynders wrote:

> 	What type is the pointer malloc returns? Is it a selector:offset
> pair, just a 32bit offset or what?

Just a 32-bit offset.  DJGPP works in a flat address space, whereby the 
segment registers (almost) never change values, so you can effectively 
forget about them, unless you need to access absolute addresses of 
memory-mapped hardware.

> The reason I need to know this is
> that I've got a few routines made with MASM which copy information from
> a mallocated buffer to SVGA buffer.

This is done in an entirely different way in DJGPP.  Please read section 
18.4 of the DJGPP FAQ list (available as v2/faq201b.zip from the same 
place you get DJGPP) to see how it should be done.

- Raw text -


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