diff options
Diffstat (limited to 'asm.c')
-rw-r--r-- | asm.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#include <stdio.h> + +int main(int argc, char *argv[]) +{ + int i = 12; + + asm(".att_syntax prefix"); + asm("movl %0, %%eax\n" : : "r" (i) : "eax"); + printf("i is: %d\n", i); + + return 0; +} + |