Date: Mon, 25 Aug 1997 13:02:26 +0300 (IDT) From: Eli Zaretskii To: Wojciech Galazka cc: djgpp AT delorie DOT com Subject: Re: how to convert real mode pointer into protected mode ? In-Reply-To: <33FAC1BA.389E@chem.uw.edu.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 20 Aug 1997, Wojciech Galazka wrote: > > So you want to read the data -without- copying it to protected mode? AFAIK, > > this is not possible. > Oh no, that sounds incredible to me :))) Nevertheless, it's true. > And if so then my answer is why ? Because you are in protected mode, where you can only access memory that is in yor program's address space. That is what protected mode is all about. And the conventional memory usually is NOT in your address space (so that you won't overwrite DOS itself with a wild pointer). See section 18.1 to 18.4 of the DJGPP FAQ list (v2/faq210b.zip from the DJGPP archives). > But the whole problem of all this thread is that I try > to avoid copying at all. Why I'm forced to copy some data. > when this data has already had its place somewhere under 1 MB? You can manipulate individual bytes, words or dwords of that struct, but you need to do that with the farptr functions, because you can't access data outside your address space with C operators. > Copying is a time-consuming task. Come on, get real! How time-consuming could be moving a dozen bytes? You *are* using 386 or better machine, are you?