如何用MIPS汇编语言打印系列末尾的字符串?

时间:2017-02-15 00:36:14

标签: assembly printing mips series

所以我试图找出如何打印一系列带逗号的整数,以及系列中最后一个整数之后的一个点。这应该是这样的: How the series should look like

这就是我的输出: How the series looks right now

我如何用MIPS汇编语言做到这一点?

这是我的代码:

li $t0, 0
for:
bge $t0, $s1, endLoop
add $t1, $t1, $s0
move $s3, $t1

# Printing the series
li $v0, 1
move $a0, $s0
syscall
# Printing the commas
li $v0, 4
la $a0, S9
syscall 

add $s0, $s2, $s0
addi $t0, $t0, 1
j for

0 个答案:

没有答案