This code seems to works:
char* mystr = "Hello world";
asm("mov $0,%%eax\n"
"leal (%0),%%ebx"
::"b"(mystr));
I've changed char mystr[] to char* mystr, and "r" with "b".. If somebody know what "b" does exactly, please let me know... many thanks