Printing a string and variable in MIPS

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2010-04-22T15:19:39Z Indexed on 2010/04/22 15:23 UTC
Read the original article Hit count: 268

Filed under:
|
|
|

Here's the C representation of what I'm trying to do in MIPS assembly:

printf ("x=%d\n", x);

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):

x=

5

How can I make them print on the same line?

© Stack Overflow or respective owner

Related posts about mips

Related posts about assembly