rdi instead of rsi in getchar