Mail Archives: djgpp/1997/10/03/21:35:29
At 12:38 10/3/1997 GMT, Aleko wrote:
>Hi,
>
>I recently downloaded DJGPP and am just learning to program in a 32-bit
>environment. I found an example (an SVGA PCX viewer) originally written for
>Watcom C++. It compiles with no problems, but when I run it, it displays a
>completely blank screen.
>
>I remember reading somewhere something about not being able to just write
>to video memory. If this is the case, then how _can_ you write to it.
>Here's how the example does it:
>
>memcpy( 0xA0000, Buffer, 65536 );
No you can't do it that way. Watcom is a poor excuse for a 32-bit compiler;
it doesn't really provide memory protection. Try the following:
#include <sys/movedata.h>
dosmemput(Buffer,65536,0xA0000);
/* or... */
movedata(_my_ds(),Buffer,_dos_ds,0xA0000,65536);
Nate Eldredge
eldredge AT ap DOT net
- Raw text -