1

所以我刚刚开始在我的课程中使用 QtSimp,但我无法模拟单个程序

例如

.data        # Data declaration section
 hello_msg:   .asciiz "Hello World!\n";

    .text

main:                # Start of code section

    la $a0, hello_msg
    li $v0, 4
    syscall

    # Now do a graceful exit
    li $v0, 10
    syscall

我会正常加载文件,但是当我尝试运行它时,会出现以下错误:

Exception occurred at PC=0x00000000
Bad address in text read: 0x00000000
Attempt to execute non-instruction at 0x80000180

这似乎是我迄今为止尝试过的任何程序的情况

QtSpim 版本:9.1.4

4

1 回答 1

5

我有同样的问题。您的 QtSpim 没有使用默认地址 0x00400000。您可以通过转到Simulator -> Run Parameters并更改Address 或 label 的值以开始运行程序从 0x00000000 到 0x00400000 来设置它。

于 2016-12-25T14:16:14.483 回答