【问题标题】:set on less than error - MIPS设置小于错误 - MIPS
【发布时间】:2013-09-14 16:35:24
【问题描述】:

好的,所以我熟悉 x86 Microsoft 程序集,但对 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

【问题讨论】:

    标签: assembly mips


    【解决方案1】:

    使用小写s 字符。您的汇编器似乎不喜欢大写的。

    【讨论】:

    • 哇.. 看起来不错.. :s
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多