Hi have to code this loop:
for($6=10;$6!=0;$6--){
$7=$6;
}
but with some conditions. I can only use BEQ and must assume that the initial value of each register is the number of the register.
How can evaluate that difference only using BEQ?
I’ve made this
main:
add $6,$5,$5
for:
add $7,$6,$0
sub $6,$6,$1
beq $6,for
but I’m stuck on the verification.
just going to overwrite it?
jump back to the start of the loop.
The code: