阿摩線上測驗 登入

申論題資訊

試卷:109年 - 108 國立中山大學_碩士班招生考試_電機系(己組):計算機結構#124091
科目:中山◆電機◆電磁學
年份:109年
排序:0

申論題內容

1. [20%] Translate the following C code to the minimum MIPS assembly instructions
int A[20], B[20];
i=0;
while (A[i]!=0 && i<20){
B[i] = A[i]+B[A[i]]+i;
i++;
}
At the beginning of this code segment, the only values in registers are the base address of arrays A and B in registers $al and $a2. Assume that the value of i is stored in the register $t1.