I was compiling some code that had this piece of code:
__asm__ __volatile__ ("
    pushw %%es
    movw %%ds, %%ax
    movw %%ax, %%es
    xorl %%eax, %%eax
    movl SurfBufD, %%edi
    xorl %%ebx, %%ebx
Blank2:
    movl SurfaceX, %%ecx
    rep
    stosw
    addl Temp1, %%edi
    subl SurfaceX, %%edi
    subl SurfaceX, %%edi
    addl $1, %%ebx
    cmpl SurfaceY, %%ebx
    jne Blank2
    popw %%es
" : : : "cc", "memory", "eax", "ebx", "ecx", "edi");
and when I tried to compile it, I got:
linux/sdllink.c:948:24: warning: missing terminating " character asm volatile (" ^ linux/sdllink.c:948:2: error: missing terminating " character asm volatile (" ^ linux/sdllink.c:949:3: error: expected string literal before ‘pushw’ pushw %%es ^ linux/sdllink.c:966:51: warning: missing terminating " character " : : : "cc", "memory", "eax", "ebx", "ecx", "edi"); ^ linux/sdllink.c:966:2: error: missing terminating " character " : : : "cc", "memory", "eax", "ebx", "ecx", "edi");
I tried to solve it changing this code to:
    __asm__ __volatile__ ( 
    "pushw %%es"
    "movw %%ds, %%ax"
    "movw %%ax, %%es"
    "xorl %%eax, %%eax"
    "movl SurfBufD, %%edi"
    "xorl %%ebx, %%ebx"
"Blank2:"
    "movl SurfaceX, %%ecx"
    "rep"
    "stosw"
    "addl Temp1, %%edi"
    "subl SurfaceX, %%edi"
    "subl SurfaceX, %%edi"
    "addl $1, %%ebx"
    "cmpl SurfaceY, %%ebx"
    "jne Blank2"
    "popw %%es"
" : : : cc, memory, eax, ebx, ecx, edi");
Basically, I assumed this function wanted every line to be a string literal, but it didn't change anything. So, what I have to do?
 
     
    