Mail Archives: djgpp/1998/12/20/09:09:53
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 ?
- Raw text -