Search code examples
mipsmips32mips64

MIPS: How to print an integer(neg or pos) as a character string?


addi $t0,$t0,4

How can i print this $t0 as a character string? Is there a syscall method for that?


Solution

  • Yes, code 11. The character to print should go in $a0

    li $v0, 11
    move $a0, $t0
    syscall