翻譯所以,我對我所翻譯這個而代碼while循環在MIPS
「I = 0的運動;而(!表[I] =值){I = I + 1;} 「
mips語言!這是我到目前爲止所做的:
add $s3, $0, $0 # i=0;
Loop: sll $t1, $s3, 2 # t1 = 4 * i
add $t1, $t1, $s6 # t1 = addres of table[i]
lw $t0, 0($t1) # t0 = table[i]
beq $t0, $s5, Exit # if table[i] == value goto Exit
addi $s3, $s3, 1 # i = i+1
j Loop # repeat: goto Loop
Exit: .... # the rest of the code "
我只是有一個問題!只有一個brach或只有一個跳躍是可能的嗎?例如只有貝克或只有跳躍?只是因爲我想成爲我的程序更快!