Date: Sun, 26 Dec 1999 09:35:13 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Valkir cc: djgpp AT delorie DOT com Subject: Re: djgpp strangeness In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 23 Dec 1999, Valkir wrote: > > > Video=Vesa.InitVesa(); > > > > > > //////cDesktop Desktop; > > > for(x=0;x<800;x++) > > > for(y=0;y<2400;y++) > > > *(Buffer+x+y*800)=x; > > > memcpy(Video,Buffer,1920000); > > > > What kind of pointer/address does Vesa.InitVesa() return? > > > > If it is a real-mode pointer, you cannot use memcpy with it; see section > > 18.2 of the FAQ for the details. > > Vesa.InitVesa() return the linear frame buffer address for the vesa card. Yes, but what kind of address is that? DJGPP programs can use only protected-mode addresses that are offsets relative to the program's DS selector's base address. Anything else needs special techniques to access without triggering a protection violation.