delorie.com/archives/browse.cgi | search |
From: | Charles Sandmann <sandmann AT clio DOT rice DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Mapping DOS base memory under 1 meg |
Date: | Thu, 31 Jul 2003 23:26:08 CDT |
Organization: | Rice University, Houston, TX |
Lines: | 18 |
Message-ID: | <3f29ebe0.sandmann@clio.rice.edu> |
References: | <84e4e2a9 DOT 0307311826 DOT 6a107b0c AT posting DOT google DOT com> |
NNTP-Posting-Host: | clio.rice.edu |
X-Trace: | joe.rice.edu 1059713052 27066 128.42.105.3 (1 Aug 2003 04:44:12 GMT) |
X-Complaints-To: | abuse AT rice DOT edu |
NNTP-Posting-Date: | Fri, 1 Aug 2003 04:44:12 +0000 (UTC) |
X-NewsEditor: | ED-1.5.9 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
> 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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |