2013-12-08 23:34:07 +01:00
|
|
|
#include <assert.h>
|
2013-12-08 23:33:05 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
int i = 0xffff;
|
|
|
|
|
|
|
|
asm("movl $23, %0"
|
|
|
|
: "=r" (i) /* output */
|
|
|
|
/* : no input */
|
2013-12-08 23:33:20 +01:00
|
|
|
/* : no clobbered */
|
2013-12-08 23:33:05 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
printf("i = %d\n", i);
|
2013-12-08 23:34:07 +01:00
|
|
|
assert(i == 23);
|
2013-12-08 23:33:05 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|