It is an I / O operand. It allows you to use your C variables in your assembler. This page contains some nice examples.
%0- this is only the first I / O operand defined in your code. In practice, it can be a stack variable, a heap variable, or a register, depending on how the compiler generated the compiler code.
For instance:
int a=10, b;
asm ("movl %1, %%eax;
movl %%eax, %0;"
:"=r"(b)
:"r"(a)
:"%eax"
);
%0in this case b, a %1- a.
source
share