Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcupt1!hprnd!pyt From: pyt@hprnd.HP.COM (Pierre-Yves Thoulon) Newsgroups: comp.sys.ibm.pc Subject: Re: VGA and Bit Mask Register: HEEEEEELP ! Message-ID: <1040011@hprnd.HP.COM> Date: 7 Mar 89 18:36:15 GMT References: <1040010@hprnd.HP.COM> Organization: HP Roseville Networks Division Lines: 33 OK ! as usual, every time I post something to notes, I find the answer by myself the day after... The solution is that I forgot to load the internal VGA latch before doing the modify/write. The full stuff is below: #define START (char far *)0xa0000000 #define END (char far *)0xa0009600 void main(void) { union REGS regs; char far *Address; >>>>>> char Dummy; regs.h.ah = 0; regs.h.al = 0x12; int86(0x10, ®s, ®s); /* set display mode 0x12 */ outp(0x3ce, 5); /* Mode register */ outp(0x3cf, 2); /* Write Mode 2 */ outp(0x3ce, 8); /* Bit Mask register */ outp(0x3cf, 0); /* all bits masked */ for (Address=START; Address < END; Address++) { >>>>>>>> Dummy = *Address; /* dummy read */ *Address = 4; /* paint pixel Red */ } pause(); reset(); }