Message-ID: <3286D227.669C@gbrmpa.gov.au> Date: Mon, 11 Nov 1996 15:13:46 +0800 From: Leath Muller Reply-To: leathm AT gbrmpa DOT gov DOT au Organization: Great Barrier Reef Marine Park Authority MIME-Version: 1.0 To: "John F. Bell" CC: djgpp AT delorie DOT com Subject: Re: AT&T Assembly References: <328699C5 DOT 2E68 AT juno DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > __asm__ __volatile__ (" > movw $16000, %%cx\n > cld\n > rep\n > movsl" > : > :"D" (0xA0000+__djgpp_conventional_base), "S" (double_buffer) > :"ax", "cx", "si", "di", "memory" > ); Umm...looks like your mixing 32 and 16 bit operands here. Your count etc is in 16 bit registers, and then your doing a 32 bit movs (movsl). Shouldnt your count then be in ecx? Your code should probably look something like: asm volatile (" movl $16000, %%ecx; cld; rep; movsl" etc etc Also, to access the video memory this way, you have to make sure you have the nearptr flag enabled or some similar such thing. This is in the FAQ if you haven't done this already... > This fills the double buffer with one color (it should anyway) > > __asm__ __volatile__(" > movb %%al, %%ah\n > movw %%ax, %%dx\n > shl $16, %%ax\n > movw %%dx, %%ax\n > movw $16000, %%cx\n > rep\n > stosl" > : > :"a" (color), "D" (double_buffer) > :"ax", "cx", "dx", "di", "memory" > ); Same with this bit of code... Leathal.