Mips help syscall -
i not understand why when mars runs function prints numbers in array not new line. can me?
stampac: lw $t6,0($a1) #stampo c[i] li $v0, 1 move $a0, $t6 syscall li $v0, 4 la $a0, a_capo syscall addi $a1,$a1, 4 addi $a3,$a3, 1 #i++ bne $a3, 10, stampac #continua fino quando i=10 jr $ra
assuming trying print newline a_capo
literal, guess not defining correctly literal.
in .data
section should write
a_capo: .asciiz "\n"
then, snippet should print newline:
li $v0, 4 la $a0, a_capo syscall
Comments
Post a Comment