www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/13/02:26:09

Date: Wed, 13 Nov 1996 09:14:57 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Eric Christopherson <Draximus AT fab DOT net>
Cc: djgpp AT delorie DOT com
Subject: Re: Question
In-Reply-To: <3288FC99.15D@fab.net>
Message-Id: <Pine.SUN.3.91.961113091034.4470G-100000@is>
Mime-Version: 1.0

On Tue, 12 Nov 1996, Eric Christopherson wrote:

> Several of you have tried to tell me how to share memory between parent
> and child programs, but I do not understand how
> __dpmi_allocate_dos_memory works.

It just calls the DOS memory-allocating functions to reserve a buffer in 
the conventional memory, then creates a protected-mode selector for that 
buffer.

> I think I understand dosmem{get|put}
> but I don't exactly what selectors are, etc.

You don't need the selectors that the above function returns.  Just use 
dosmemget and dosmemput to move data from and to the allocated buffer.
(Selectors are a protected-mode equivalent of the real-mode segments.  
You should get some book on protected-mode programming with Intel CPUs 
and read the first chapters which describe how x86 works in protected 
mode.  This issue is too vast to describe in a post.)

- Raw text -


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