Thursday, October 01, 2009 12:18 AM,



A student writes:



	Dear Dr. Patt
	    I have a super quick question for the programming assignment. Does 
	it matter if our submission has our own comments? Like for example after
	the 0's and 1's I added a ; and added my personal comments. 



Actually, not only is it okay, but it is a very good idea.  While you are 
working on the program, it will remind you why you are using the instructions 
that you are using.  If you need help from a TA, it will give the TA help in 
figuring out where you making a mistake.  Finally, when we grade it and if the 
score is low, we can use your comments to figure out whether the mistake was 
careless or a simple error.  So, yes, comments.



	Another question, 



I thought you had ONE super quick question?



	When I run the simulator, and I run the program the 
	simulator ends on the address xFD79, is that right?



I would have to look, but that sounds about right.  The halt instruction is 
really a trap instruction (opcode = 1111) which turns control over to the 
operating system (linux, windows, etc.) to stop the machine. x25 is the trap 
vector that informs the operating system what it is the program wants it to do 
on its behalf.  The operating system will then execute a sequence of 
instructions to halt the computer.  If your address xFD79 is correct, that 
means the last instruction the computer executed in stopping the machine is at 
xFD78.  (Remember PC=1)  More on that in class on Monday.
For now, just think of the halt as 1111 0000 0010 0101.



	Sincerely, 
	<<name withheld to protect the student who SAYS he has one question>>



Good luck finishing the program.
Yale Patt