title: GCC: putchar(char) in inline assembly
body: <p>Overflow, </p>
  
  <p>how can I implement the putchar(char) procedure using inline assembly only? I would like to do this in x86-64 assembly. The reason for me doing this is to implement my own standard-lib (or at least part of it). Here is what I have so far:</p>
  
  <pre><code>void putchar(char c)
  {   
      /* your code here: print character c on stdout */
      asm(...);
  }   
  
  void _start()
  {   
      /* exit system call */
      asm("mov $1,%rax;"
          "xor %rbx,%rbx;"
          "int  $0x80"
      );  
  }
  </code></pre>
  
  <p>I am compiling with:</p>
  
  <pre><code>gcc -nostdlib -o putchar putchar.c
  </code></pre>
  
  <p>Thanks for helping me!</p>