go to previous page   go to home page   go to next page hear noise highlighting

Suggest three values for x for use in testing.

Answer:

0, 1, -1. Of course you don't stop there, but running with these three values often reveals problems.


A Run of the Program

SPIM with the Program

Here is a run of the program after x was changed to -1. The result, 0x72 = 11410 is correct. As always, running is done by single-stepping (pushing F10). The PC is initialized to 0x00400000.

Create a source file and play around with the program. Put some bugs into the program and see what they do. Experimentally determine the range allowed for x.


QUESTION 20:

How can you solve for the allowed range of x?


go to previous page   go to home page   go to next page