Printing newline in MIPS

If you’re just trying to print a newline, it’s simpler (and slightly more memory efficient) to do it using syscall 11 to print a single character.

.text
main:   addi $a0, $0, 0xA #ascii code for LF, if you have any trouble try 0xD for CR.
        addi $v0, $0, 0xB #syscall 11 prints the lower 8 bits of $a0 as an ascii character.
        syscall

Leave a Comment