Mail Archives: djgpp/1996/11/13/02:26:09
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 -