/*
* An example of instructions with only input values
*
* 使用volatile
*/
#include
int main()
{
char input[30] = {"This is a test message.\n"};
char output[30];
int length = 25;
__asm volatile("cld\n\t"
"rep movsb\n\t"
:
: "S"(input), "D"(output), "c"(length));
printf("%s\n", output);
return 0;
}