Mail Archives: djgpp/2000/05/11/23:44:54
On Thu, 11 May 2000, Adam Majer wrote:
> I need 48 bit far pointers to access hardware memory (video, DMA, ....). I
> have the selectors but I'm stuck with the akward _far* functiosn. Heck,
> all they do is use the fs register to access other memory... Oh well..
Have you tried the __djgpp_nearptr_enable() function. It can do
exactly what you need. Except that protection is not guaranteed and no
selector limits (Selector limit is 4GB). But it's a simple and useful
thing. Check section 17.7 and 18.6 of the FAQ for more info on this.
> It would have been a lot easier to program in DJGPP if you could allocate
> far pointers. As in having a selector with appropriate limits given to you
> by the new command.
>
> char far* MyThins = new char[222];
>
> That way you could test for out of bounds errors! (I know there are only
> 8K worth of local descriptors that's why it would be reserved for far *
> only)..
This has nothing to do with DJGPP. far pointers are not supported by gcc,
so neither does the DJGPP port of gcc. And that's why the
__djgpp_nearptr_* functions are there for us.
Prashant
- Raw text -