- spim: (parser) syntax error on line 2 of file xxx
.word 10,11,12,13,14,15,16,17,18
^
line 2:A: .word 10,11,12,13,14,15,16,17,18
改为
A: .word 10, 11, 12, 13, 14, 15, 16, 17, 18
或
A: .word 10:18
- spim: (parser) syntax error on line 5 of file xxx
j: .word 0
^
line 5:j: .word 0
改为
J: .word 0
-
spim: (parser) Label is defined for the second time on line 8 of file xxx
main:
^
line 8:main:
根据CS 265 George Mason University D. Nordstrom的A Quick Introduction to SPIM,在QtSpim的菜单栏File->Reinitialize and Load File后即可解决该问题。
-
spim: (parser) syntax error on line 14 of file xxx
lw $t2,$t1($s5)
^
line 14:lw $t2,$t1($s5)
改为
add $t1,$s5,$t1 lw $t2,0($t1)
-
Attempt to execute non-instruction at 0x00400030
根据Attempt to execute non-instruction in mips assembler?在.s文件代码最后一行添加jr $ra