设置小于错误 - MIPS

时间:2013-09-14 16:35:24

标签: assembly mips

好的,所以我对x86微软组装很熟悉,但对MIPS汇编来说是新手,我选择了MARS汇编程序,但事情并不顺利......

main:
li $s0, 0
li $s1, 0
li $s5, 100 


Loop: slti  $t0, $S0, 100
      beq  $S3, $zero, Fin
      add  $s1, $S1, $s0
      addi $S0, $s0, 1
      j Loop

没有错误的单行...但我真的无法理解为什么......代码是正确的,或者我相信...

Error in /home/****/Desktop/Ex.asm line 9 column 18: "$S0": operand is of incorrect type
Error in /home/****/Desktop/Ex.asm line 10 column 12: "$S3": operand is of incorrect type
Error in /home/****/Desktop/Ex.asm line 11 column 17: "$S1": operand is of incorrect type
Error in /home/****/Desktop/Ex.asm line 12 column 12: "$S0": operand is of incorrect type

我在另一台Windows机器上测试过它..它工作了..:?在这里使用Debian

1 个答案:

答案 0 :(得分:2)

使用小写s个字符。你的汇编程序似乎不喜欢大写字母。

相关问题