A good answer might be:

Yes.

Example Program

Let us write a program that reads integers from the user and adds up those integers x that are in the range -32 <= x <= +32 and discards the rest. The user signals the end by entering -999 (which is not added to the sum). Here is the basic outline:

main:   
        li    $v1,0            # zero the sum
loop:
        . . . .                # prompt the user for input
        li    $v0,5            # read the integer
        syscall                # into $v0

        ____ $v0,____9,done    # while ( $v0 =/= -999 )

        ____ $v0,____,out          # less than -32
        
        ____ $v0,____,out          # greather than 32
               
        addu  $v1,$v1,$v0          # if in range add           
                                   # else skip
out:    b     loop        
        
done:   . . . .                # write out result

(Recall that for the examples in this chapter delayed loading and branching have been turned off.)

QUESTION 7:

Fill in the blanks