Date: Fri, 3 Oct 1997 18:33:56 -0700 (PDT) Message-Id: <199710040133.SAA18135@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: "Aleko" , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Memory in Protected Mode Precedence: bulk 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 dosmemput(Buffer,65536,0xA0000); /* or... */ movedata(_my_ds(),Buffer,_dos_ds,0xA0000,65536); Nate Eldredge eldredge AT ap DOT net