delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/03/07:11:04

Message-Id: <199711031208.XAA05407@rabble.uow.edu.au>
Subject: Question about __dpmi_allocate_dos_memory
To: djgpp AT delorie DOT com (DJGPP)
Date: Mon, 3 Nov 1997 23:08:25 +1100 (EST)
From: Brett Porter <bporter AT rabble DOT uow DOT edu DOT au>
MIME-Version: 1.0

Hi

I've noticed that __dpmi_allocate_dos_memory has superseded (and much
simplified) calling this DPMI function, over the
_go32_dpmi_allocate_dos_memory equivalent.

But the routine gives you back just a selector and a segment.

So if I have a structure MyStruct, I want to call like this:

movedata( _my_ds(), (int )&MyStruct, DosSelector, 0, sizeof( MyStruct));

Is this right?

My question is about the 0 ... I have just assumed this is the offset to
use, because there is no offset returned. Likewise when I pass the segment
returned from the allocate to __dpmi_int with an es:ebx combination: I
assume again that the allocation aligns it on a segment boundary?

Or am I doing something seriously wrong? (BTW, the code doesn't work... in
case you haven't guessed :)

Thanks,
Brett

-- 
"Who here believes in telekenesis? Raise MY hand!"
--
Brett Porter
bporter AT rabble DOT uow DOT edu DOT au

http://www.geocities.com/CollegePark/Union/3596
	Humour, Programming, and more.

- Raw text -


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