Mail Archives: djgpp/1999/01/03/03:39:04
On Thu, 31 Dec 1998, François Poirier wrote:
> tried to make a selector like this:
> and it dosen't work? And how do I access it am I correct?
There are several working examples in section 18.4 of the FAQ, aren't
they enough to get you started?
> __dpmi_set_segment_limit(video_selector, 2000000L); /* 2 Megs */
The limit should be 1 less than the size. Also, 2000000 is NOT
2MBytes.
Why do you need a 2MB-large segment for video? Also, you never say
what base address did you use for the segment.
And last, don't forget to check the errors reported by these
functions!
> For accessing it:
> _farpokeb(video_selector, (int)rand()%639 * Max_X + (int)rand()%479,
> (char)rand()%255);
This is correct (though you probably mean 640 and 480, not 639 and
479).
What problems did you see?
- Raw text -