有人研究过怎么用了吗?
我今天把SPIM抓下来以后
拿了一些范例程式来测试 却没有一个打的开
不停的跳syntax error 却又不说是错了什么
像是这个程式(助教的讲义给的第一个范例):
#sample example 'add two numbers’
.text # text section
.globl main # call main by SPIM
main: la $t0, value # load address ‘value’ into $t0
lw $t1, 0($t0) # load word 0(value) into $t1
lw $t2, 4($t0) # load word 4(value) into $t2
add $t3, $t1, $t2 # add two numbers into $t3
sw $t3, 8($t0) # store word $t3 into 8($t0)
.data # data section
value: .word 10, 20, 0 # data for addition
加载时只会跳出
spim: (parser) syntax error on line 6 of add.s
main: la $t0, value # load address ‘value’ into $t0
^
Would you like to open the Settings dialog box to verify simulator settings?
我的设定是照这个讲义写的
http://chortle.ccsu.edu/AssemblyTutorial/Chapter-09/ass09_6.html
不然照原设定每次load只会看到exceptions.s
一整个不知道这个程式要怎么用......