delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/01/18:25:10

Date: Thu, 1 Oct 1998 18:24:11 -0400 (EDT)
From: "Miles F. Bintz Ii" <bintzimf AT clarkson DOT edu>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp AT delorie DOT com
Subject: Re: Access phys. mem above 1 meg
In-Reply-To: <Pine.SUN.3.91.981001213745.18395d-100000@is>
Message-ID: <Pine.A41.3.96.981001180512.88950A-100000@polaris.clarkson.edu>
MIME-Version: 1.0

> 
> > Well, what do I do with a selector?  I don't want to use the near/far ptr
> > hacks.
> 
> Why not?  farptr is very fast, as the FAQ describes.
> 

The whole concept of near and far doesn't exist in protected mode.  I get
the feeling that this is not the *proper* way to do it.  Not to mention,
it *is* called a "hack"...

Is there any way that I can map that memory into part of my data
segment? 

And in fact, the FAQ says this method is slow... but then later goes on to
say that 'experience says.... its not that bad'.  But recommends using
nearptr hack if I need that additional speed.

> You need to understand that there's no way for you to access that address 
> without using the selector with nearptr or farptr, since that address is 
> not mapped into your DS selector.
> 
> > I would like to be able to say
> > 
> >  char *myptr = 0xda000000
> >  myptr[0] = 0xab;
> 
> This is exactly what nearptr allows you to do.  So what's the problem?
> 

Near pointer takes away protection.

As it turns out, I've decided that the far ptr hack will suffice to
read/write small pieces of data.  For my "performance sensitive"
reads/writes I will probably use a section of memory in DS and use the
movedata function to get it out to the correct memspace.  Do you know any
of the details on movedata?  Does this use DMA?  How is the performance of
this function when moving large blocks of data?

  -Miles

- Raw text -


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