#include // contains info about printf int x = 0; // only global variables can be seen in asm blocks int main(void) { x = 42; asm("push eax \n\t" "mov eax, _x \n\t" "add eax, 1 \n\t" "mov _x, eax \n\t" "pop eax"); printf("%d\n", x); // should print 43 return 0; }