Have no clue, I read How do i read single character input from keyboard (键盘) using nasm (assembly) under ubuntu?, and I can't write executable program.
My expected effect is:
> ./program
please input some character: abcdefg
abcdefg
I examined ioctl syscall, and use man termios
, but I can't found about the second parameter cmd
introduction, such as TCGETS 0x5401
, and I don't know how to use it.