From: "A.Appleyard" Organization: Materials Science Centre To: djgpp AT delorie DOT com Date: Mon, 20 May 1996 09:37:53 GMT Subject: Re: graphics: writing directly to screen Message-ID: <8DA2994535@fs2.mt.umist.ac.uk> watcom353 AT aol DOT com wrote (Subject: graphics):- > I use int 10h to set the video mode like this: union REGS regs; > regs.w.ax=mode; int386(0x10,®s,®s); That works fine. ... But I can't > get a pixel on the screen. I've tried unsigned char *scr=0xa000; with many > different amounts of 0s after the a. But I always get a GPF. How can I write > to the screen. ... The screen address 0xa0000 (with 4 zeros) is an absolute (real mode) address, but if you write e.g. `char *scr=0xa000; scr[0]=7;' in Gnu C/C++ you are writing to the protected mode address *0xa0000, which is a different animal. (0xa000 with 3 zeros is the address of the screen: full address = segment_address * 16 + offset.)