You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
c-exercises/test-inline-assembly.c

18 lines
247 B
C

#include <assert.h>
#include <stdio.h>
int main() {
int i = 0xffff;
asm ("movl $23, %0"
: "=r" (i) /* output */
/* : no input */
/* : no clobbered */
);
printf("i = %d\n", i);
assert(i == 23);
return 0;
}