Mail Archives: djgpp/1996/07/09/02:11:35
On Tue, 9 Jul 1996, Leath Muller wrote:
> What I want to know is: Is this programming practice bad? I assumed that
> a near pointer in protected mode was the same as a far, ie: could access the
> full 4GB segment. It also seems to allow fast memory access...
It effectively disables memory protection, so a program with a wild
pointer can make all kinds of trouble, like wipe out your disk. I
suggest using this technique only if other methods are unacceptably slow
for your application. The DJGPP FAQ list (available as v2/faqNNNb.zip
from the same place you get DJGPP, where NNN is the version number)
describes the available methods of moving data to memory-mapped
peripherals in section 18.4 (section 18.6 describes the nearptr method in
more detail).
- Raw text -