Mail Archives: djgpp/2000/02/13/05:19:35
On Sat, 12 Feb 2000, Yoda wrote:
> unsigned char *videoptr = (unsigned char *)0x0;
> short our_global_selector = __dpmi_allocate_ldt_descriptors(1);
> __dpmi_set_segment_base_address(our_global_selector, linear_address);
>
> _farpokeb(our_global_selector, videoptr + y*width +x, color);
>
> void copy_buffer2(void)
> {
> movedata(_my_ds(), doublebuffer, our_global_selector, videoptr,
> width*height);
> }
>
> I did the same but i get an error at the farpokeb or the movedata.
The above code fails to set the segment limit, so the limit is either
some (small) default value or garbage. That's why accessing it causes
a GPF.
- Raw text -