delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/08/02/01:19:40

From: jbs30000 AT aol DOT com (Joel)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Mapping DOS base memory under 1 meg
Date: 1 Aug 2003 22:01:41 -0700
Organization: http://groups.google.com/
Lines: 23
Message-ID: <84e4e2a9.0308012101.643c8a8c@posting.google.com>
References: <84e4e2a9 DOT 0307311826 DOT 6a107b0c AT posting DOT google DOT com> <3f29ebe0 DOT sandmann AT clio DOT rice DOT edu>
NNTP-Posting-Host: 172.175.33.152
X-Trace: posting.google.com 1059800501 25666 127.0.0.1 (2 Aug 2003 05:01:41 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 2 Aug 2003 05:01:41 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Charles Sandmann <sandmann AT clio DOT rice DOT edu> wrote in message news:<3f29ebe0 DOT sandmann AT clio DOT rice DOT edu>...
> > I'm writting some SVGA code which uses banked modes if a linear mode
> > is not availible.  Now, I had an idea of, when using _farpokeb instead
> > of adding segment << 4 to the offset, which is usually A0000 + offset,
> > I would make a selector for the A000 - AFFF graphics memory buffer. 
> 
> SNIP.  No need to map items in first megabyte.
> 
> > So, is there a reliable way to make a base memory selector other than
> > just using the __djgpp_nearptr_enable() ?
> 
> First allocate an ldt descriptor (__dpmi_allocate_ldt_descriptors(1))
> Set the size to be 64K.
> Set the base to be A0000
> 
> You can now access it directly - no need to map the memory in 1st MB.
> 
> Alternately, you can call __dpmi_segment_to_descriptor which is easier.

Yeah, while looking up dpmi functin I came across the segment to
descriptor function, but didn't like that any descriptor it made
couldn't be modified or freed, but it's nice to know that I can just
allocate a descriptor without having to map it.  Thanks.

- Raw text -


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