Date: Thu, 1 Oct 1998 18:24:11 -0400 (EDT) From: "Miles F. Bintz Ii" To: Eli Zaretskii cc: djgpp AT delorie DOT com Subject: Re: Access phys. mem above 1 meg In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII > > > 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