Mail Archives: djgpp/1998/01/30/12:49:21
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);
>
movedata also requires the size of imagebuffer as the 5th argument.
Liche
> -- Sinan
- Raw text -