delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/01/11:20:21

From: "Miles F. Bintz Ii" <bintzimf AT clarkson DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Access phys. mem above 1 meg
Date: Thu, 1 Oct 1998 11:15:59 -0400
Organization: Clarkson Univeristy
Lines: 40
Message-ID: <Pine.A41.3.96.981001110642.79082A-100000@polaris.clarkson.edu>
NNTP-Posting-Host: polaris.clarkson.edu
Mime-Version: 1.0
X-Trace: news.clarkson.edu 907254963 26499 128.153.4.24 (1 Oct 1998 15:16:03 GMT)
X-Complaints-To: abuse AT clarkson DOT edu
NNTP-Posting-Date: 1 Oct 1998 15:16:03 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I've read the FAQs but I still seem to be missing a piece of
information...

I want to access physical address 0xDA000000.

I do the following:

__dpmi_meminfo mi;
mi.size = 0xfffff;
mi.address = 0xDA000000;
selector == __dpmi_allocate_ldt_descriptors(1);
__dpmi_physical_address_mapping(&mi);
__dpmi_lock_linear_region(&mi);
__dpmi_set_segment_base_address(selector, mi.address);
__dpmi_set_sedment_limit(selector, mi.size);

And so now I have a selector to my physical address at DA000000 right?
Well, what do I do with a selector?  I don't want to use the near/far ptr
hacks.

I would like to be able to say

 char *myptr = 0xda000000
 myptr[0] = 0xab;

for example.  But I dont know what the proper method of getting a selector
into a ponter is...  Can someone explaing to me what I need to do?

If I cant do what I stated above, can someone explain what happens
"behind the scenes" for a piece of data to get out to memory via a
selector?

Performance will be an issue futher down the road so I would like the
knowledge on how everything is working here in case I need to optimize
something.....

Thanks!
-Miles


- Raw text -


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