From: Liche Newsgroups: comp.os.msdos.djgpp Subject: Re: Problems with pointers Date: Sat, 31 Jan 1998 01:11:23 +0800 Organization: New Silkera Network Lines: 34 Message-ID: <34D209BB.7B939A0E@tp.silkera.net> References: <34D1B000 DOT 9EFD50DF AT tp DOT silkera DOT net> <34D20527 DOT 253 AT cornell DOT edu> NNTP-Posting-Host: ts140.tp.silkera.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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