Mon, 26th Oct 2015, 01:16 Re: Problem number 3.

A student writes:

> Hello professor,
> My name is ******** and I am stuck on problem 3 on PS4. I don't understand
> what is the program meant to do. It seem all the programs does is halt when
> the value in memory x3100 and count how many times it the programs run
> until it stop if the value in x3100 is negative or positive. So what is the
> purpose of this program?
> Thank you,
> <<name withheld to protect one who wants to know what the program is doing>>

Since the problem set is due tomorrow before class, this email may not do
some of you any good as far as the problem set is concerned, but could be
useful when it comes to the next midterm or final exam.

If you look at the instructions and do not see immediately what the program
is doing, a good first step is to try some sample input.  Since the program
is doing something with what it loaded from x3100, it makes sense to try
some example values in x3100 and see what happens in each case.

If you look at the program, you notice that sometimes it is incrementing
a register and sometimes it isn't.  So you should ask yourself what is
causing the register to get incremented.

By probing in this way, you can usually figure out what the program is doing.

Good luck with the rest of the course.

Yale Patt