0
所以我的jal操作員看起來並不像做它應該做的事情。它看起來就是節省了4個地址,而不是它想要的。我的測試代碼是:爲什麼我的JAL從PC獲得+4以上的應該?
.data
test: .asciiz "test"
test1: .asciiz "test1"
test2: .asciiz "test2"
.text
main:
la $a0, test
li $v0, 4
syscall
li $t9, 5 # messing with line before jal
jal next
li $v0, 10
syscall
# it should never hit this code
la $a0, test1
li $v0, 4
syscall
next:
la $a0, test2
li $v0, 4
syscall
jr $ra
li $a0, 1 # it should never hit this code
li $v0, 1
syscall
輸出結果爲:「執行:執行因錯誤而終止」。代碼並不重要,它只是假設用jal顯示問題,有誰知道如何修復pc或jal? (我已經重新安裝了mars和java。)
printscreenofjal
謝謝你,這個工作。直到你提到它,我才知道這是一種選擇。我也認爲重新安裝它會重置默認值。儘管現在工作。 – Joseph