Good morning guys, I'm new to assembly and I'm in need of a little help if possible. I need to translate the following code into assembly:
// Sendo i,total e n os registradors $s1, $s2, $s3
i=0;
total=0;
while( i < n ) {
total=total+X[i];
i=i+1;
}
I've already been able to do the following commands:
add $s1 , zero , zero
add $s2 , zero , zero
Loop: slt $t0, $s1, $s3
beq $t0, $zero, Exit
add $t1, $s1, $s1
...
addi $s1, $s1, 1
j Loop
I can not determine which part comes in the '...' Could someone please help me? Thank you!