I\'m trying to make a small program in assembly (for AT&T). I\'m trying to get an input from the user in the form of an integer, increment it after that and then output
re: updated code:
It runs and increments now, however, when the incremented value is outputed, there show up some weird signs after the value.
Arg-passing registers are call-clobbered. You call printf without putting the format-string into %rdi, which you have to assume holds garbage after scanf returns.
Single-step your code with a debugger. Use ni to step over calls in gdb. (See the bottom of the x86 tag wiki for GDB tips).