【发布时间】:2020-05-05 21:36:19
【问题描述】:
我正在学习 RISC-V 汇编,我需要使用数组来解决我正在解决的练习;问题是我正在使用的模拟器(RARS)给了我一个错误:Error in /home/username/file_name line 8: Runtime exception at 0x00400010: address out of range 0x000003e8.
这是我目前写的代码:
.data
arr: .word 1000
e0: .word 5
.text
lw t1, arr # load arr into t1
lw t2, e0 # Load e0 value into t2
sw t2, 0(t1) # save t2 value into arr[0]
我做错了什么?
【问题讨论】: