Message-Id: <199603051518.KAA15240@delorie.com> Date: Tue, 05 Mar 96 15:01:10 LIT From: Martynas Kunigelis Subject: Re: WHY DOESN'T IT WORK!? To: Chris Dial , DJGPP mailing list In-Reply-To: Your message of Sat, 02 Mar 1996 19:53:42 -0800 On Sat, 02 Mar 1996 19:53:42 -0800 Chris Dial wrote: > > /* So how come this does not send one byte to 'screen2'? */ > asm (" > pushw %es <---- skip! > movw _our_global_selector,%es <--- skip! why on earth use _dos_ds to access *program's* data? We have our good old DS for that! > movl _screen2,%edi ^^^^ here's another bug. Use `leal _screen2,%edi' or `movl $_screen2,%edi' > movb $255,%es:(%edi) ^^^ - skip that stuff. > popw %es <--- skip! > "); > And don't forget to restore *all* registers you clobber in your inline asm unless you specify them in "clobberred registers" field after the third colon (see info on inline asm syntax). > return 0; >}; > > >-Chris Dial Martynas Kunigelis