| www.delorie.com/archives/browse.cgi | search |
| From: | "A. Sinan Unur" <sinan DOT unur AT cornell DOT edu> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Problems with pointers |
| Date: | Fri, 30 Jan 1998 10:51:51 -0600 |
| Organization: | Cornell University |
| Lines: | 21 |
| Sender: | asu1 AT cornell DOT edu (Verified) |
| Message-ID: | <34D20527.253@cornell.edu> |
| References: | <34D1B000 DOT 9EFD50DF AT tp DOT silkera DOT net> |
| Reply-To: | sinan DOT unur AT cornell DOT edu |
| NNTP-Posting-Host: | 128 |
| Mime-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |