Mail Archives: djgpp/1998/01/30/13:19:35
A. Sinan Unur wrote:
> Liche wrote:
>
> > void PCXimage::showbuffer()
> > {
> > dosmemput(imagebuffer, 64000, video_buffer);
> > }
> >
> > A general protection fault occurs, and the program terminates.
> > video_buffer is an unsigned char * to 0xA0000, the physical address
> > of VGA memory. Does anybody know how to resolve this problem? Please
> > email me for the complete source. Thanks
>
> this is actually a FAQ in disguise.
>
> try
> dosmemput(imagebuffer, 64000, 0xa0000);
>
> or, equivalently,
> movedata(_my_ds(), (unsigned) imagebuffer, _dos_ds, 0xa0000);
>
> -- Sinan
Those also do not work. Trying to cout imagebuffer (an array of
unsigned chars) also produces a fault. Upon setting a watch to
imagebuffer, i find that *imagebuffer, imagebuffer, and &imagebuffer all
are _nonexistant_?!?! Yet it compiles correctly...
Is this a problem with my class definition?
Liche
- Raw text -