Date: Wed, 20 Dec 1995 08:22:35 +0200 (IST) From: Eli Zaretskii To: Laszlo Vecsey Cc: djgpp AT delorie DOT com Subject: Re: Pointer to video memory (0xA000) On 18 Dec 1995, Laszlo Vecsey wrote: > Help! I get a general protection fault when accessing a pointer to video memory. > > In Borland C++ I'm used to putting pixels to the screen as follows: > > unsigned char far *videomemory = (unsigned char far*)(0xA0000000); > videomemory[320*y+x] = color; Please read the DJGPP FAQ list (available as faq102.zip from the same place you get DJGPP), section 10.6, which explains why this won't work and gives you a way to do this correctly. The short answer is that in a protected-mode environment you cannot just poke any address, you must do it in a way that's compliant with memory-protection mechanism.