Message-ID: <35F3A997.9D2EAF64@geocities.com> From: Merlin MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: vga References: <6suf6t$7mt$1 AT front6 DOT grolier DOT fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 58 Date: Mon, 07 Sep 1998 09:38:20 GMT NNTP-Posting-Host: 231-cy-wpg.ilos.net NNTP-Posting-Date: Mon, 07 Sep 1998 04:38:20 CDT Organization: MBnet Networking Inc. To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk conrad wrote: > glopglop > > does anyone know how to switch to vga mode with djgpp ? > :o) > void mode(int mode){ union REGS regs; //__dpmi_regs could have been used here.. regs.x.ax=mode; int86(0x10,®s,®s); //and __dpmi_int(,) could have been used here... } I think it's actually safer to use __dpmi_int() but i don't think it matters in this case.. That will change to the given screen mode.. > and how can I use asm {} ? using __asm__ ();for example this will put colour values into the color registers to change the colour zero in inline asm.. __asm__ __volatile__(" movw $0x3c8,%%dx\n movb $0,%%al\n outb %%al,%%dx\n inc %%dx\n movb %0,%%al\n outb %%al,%%dx\n movb %1,%%al\n outb %%al,%%dx\n movb %2,%%al\n outb %%al,%%dx" : :"g"(red),"g"(grn),"g"(blue) :"ax","dx","memory"); damn proportional fonts... you may have noticed the at&t syntax... I suppose this probably won't help you much...but still it might so i posted it... confused? I think there's a link to a tutor like site on the djggp site....inverse reality or something.. L8r, Merlin.