www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/25/04:57:07

Date: Sun, 25 Apr 1999 11:54:42 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tim Updegrove <tdu AT enter DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Allocate dos memory
In-Reply-To: <371fcde7.5102505@news.enter.net>
Message-ID: <Pine.SUN.3.91.990425115423.9117X-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Fri, 23 Apr 1999, Tim Updegrove wrote:

> 1.   How do I get the physical address from the selector and/or
> segment that is returned by  __dpmi_allocate_dos_memory?  Is it just
> (segment*16)+offset?

Yes.

> 2. I assume this area of memory doesn't have to be locked.  Correct?

Correct.  All DOS memory is locked by default by all DPMI servers I've
heard of.

> 3. If more than 64k bytes are allocated (like I did), must
> __dpmi_get_selector_increment_value or something be called to get a
> new selector when crossing a 64k boundary?

I don't understand why would you need this at all.  You don't need the
selector to access the DOS block; simply use the farptr functions with
_dos_ds as the selector and the linear address (seg*16+offs) as the
offset.  If you do that, you can stop worrying about crossing 64KB
boundaries.

- Raw text -


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