MIPS assembly. Practice question for midterm tomorrow.
Extracted text: Translate the loop into MIPS assembly using the given blocks. for (int i = 15; (i - x) > 0; i--) { // BODY } Use: $s0 for i $s6 for x li $s0, 15 sub $t0, $s0, $s6 ble $t0, $0, exit body: addi $s0, $s0, -1
Extracted text: li $s0, 15 sub $t0, $s0, $s6 ble $t0, $0, exit body: addi $s0, $s0, -1 sub $t0, $s0, $s6 bgt $t0, $0, body exit: bgt $t0, $0, exit sub $t0, $s6, $s0 ble $t0, $0, body sub $t0, $s6, $s0 addi $6, $s6, -1