title: Printing a string and variable in MIPS
body: <p>Here's the C representation of what I'm trying to do in MIPS assembly:</p>
  
  <pre><code>printf ("x=%d\n", x);
  </code></pre>
  
  <p>I know that I can do a syscall to easily print x=  and I can also do a syscall to print the int x (which is stored in a register).  However, that prints them like this (let's say x is 5):</p>
  
  <blockquote>
    <p>x=</p>
    
    <p>5</p>
  </blockquote>
  
  <p>How can I make them print on the same line?</p>