Message-ID: <367D056A.E1F31CB7@gmx.net> Date: Sun, 20 Dec 1998 15:10:50 +0100 From: Christian Hofrichter X-Mailer: Mozilla 4.5 [de]C-CCK-MCD QXW03201 (Win95; I) X-Accept-Language: de,en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re:Re:Need ASM-Syntax to put code into one asm-instruction Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Now I have put these instructions into one asm. I have saved the es and ds-register temporarly but now I can't change the ds-register without getting and general protection fault. asm("movw %%ds,_ds \n\t" "movw %%es,_es\n\t" "movw %0,%%es \n\t" "movl %1,%%edi \n\t" "movl %2,%%esi \n\t" "movw %3,%%cx \n\t" "movb %%cl,%%bl\n\t" "shr $2,%%cx \n\t" "and $3,%%bl \n\t" "movw %4,%%ds \n\t" /*<= causes crash */ "rep\n\t" "movsl \n\t" "movb %%bl,%%cl\n\t" "rep\n\t" "movsb\n\t" "movw _ds,%ds \n\t" "movw _es,%%es": :"r"((unsigned short) vesa_framebuffer),"r"(address),"r"(buffer),"r"(breite),"r"(progsel) :"%cx","%esi","%edi" ); Now the syntax is right, isn't it ?