title: GCC Inline-Assembly Error: "Operand size mismatch for 'int'"
body: <p>first, if somebody knows a function of the Standard C Library, that prints
  a string without looking for a binary zero, but requires the number of characters to draw, please tell me!</p>
  
  <p>Otherwise, I have this problem:</p>
  
  <pre><code>void printStringWithLength(char *str_ptr, int n_chars){
  
  asm("mov 4, %rax");//Function number (write)
  asm("mov 1, %rbx");//File descriptor (stdout)
  asm("mov $str_ptr, %rcx");
  asm("mov $n_chars, %rdx");
  asm("int 0x80");
  return;
  
  }
  </code></pre>
  
  <p>GCC tells the following error to the "int" instruction:</p>
  
  <pre><code>"Error: operand size mismatch for 'int'"
  </code></pre>
  
  <p>Can somebody tell me the issue?</p>