Mail Archives: djgpp/1996/08/21/23:53:30
Tony O'Bryan wrote:
>
> Leath Muller (leathm AT gbrmpa DOT gov DOT au) wrote:
>
> : If your not in the final development stages of your program, it ends up
> : OK to use the farnspoke etc routines because your not too worried about
> : speed. What I did, was wait until I knew my routines were debugged fully
> : (fully? yeah right... ;) and then used the __crt0_nearptr_enable (or
> : similar) flag at the start of my program to disable all memory
> : protection.
> : This has the advantage of not having to call the enable/disable calls
> : all the time, and increases the speed of video intensive subroutines a
> : LOT!
>
> Will __crt0_nearptr_enable allow a pointer to linear address 0xa0000 to
> directly access the video screen?
It will, but you have to add the __djgpp_base_address to your pointer
(I can't remember the actual variable name, but it's something like that
-
check the FAQ) to make sure your pointer accesses the correct memory
location.
ie: char *video_buffer = (0xa000 + __djgpp_base_address);
Then you can access this with: video_buffer[1000] = 200; etc...
Leathal.
- Raw text -