Sunday, October 04, 2009 11:41 AM,



A student writes:

	 Good morning Dr. Patt,
 
	   I was wondering whether or not we had to strictly adhere to the input 
	positions that you gave as an example in the program problem.  You said that 
	we had to load an input from somewhere "(i.e. x3100)"  But I was wondering if 
	we could use a different location, because I wrote my program so it would be 
	convenient for myself (and hopefully you guys since you won't have to jump all 
	around to find my IN/OUT slots.  Instead of x3100 and x3001 for in and out, 
	respectively, I used x300D and x300E, again, respectively.  By adding  a 
	breakpoint to the Halt instruction, I was able to run my program without 
	having to jump to my I/O and then jump to my program to rerun it.  However, I 
	heard that we had to use the x3100 as the input location... So I wanted to 
	clarify whether this was true or not. Thank you for your time.
 
	 With a little bit of a headache,
	 <<name withheld to protect the student who finds it easier to solve 
	 his problem, rather than the problem I specified>

The short answer: No, usse x3100 as the input location.

There are lots of reasons for this.  Yes, I realize it is easier for you to 
use x300D, but that was not the specification of the problem.  Usually, any 
program you write is going to have to work with programs that others write.
So, if someone else writes sa program to put that value into x3100 for your 
use, and you decide to look in x300D for it, guess what?  It won't be there.
So, you may as well learn right now to write a program that follows the 
specifications of what your program has to do.

Also, grading 445 programs will be much harder for us if we have to look 
individually at each to find out where you happened to decide where to put the 
result.  ...especially when there is no reason for us to have to do this.

Most important, as is usually the case, we were testing something that does 
not get tested if you use x300D.  So, you define away part of the problem when 
you choose to ignore the specification of the problem.

Simple example:  Suppose I gave you a two part problem:

a. What is the smallest number that is larger than 5,000,000 that can be 
written as the product of two primes?
b. What are the two prime numbers that when multiplied together give you the 
number of part a.

Suppose you are totally clueless.  So you answer part a as 35 which is not 
correct.  Then for part b, you write: 5 and 7.

How much partial credit do you deserve?  Hint: zero.

Good luck finishing the program as specified today.

Yale Patt

 
	 P.S.  I'm trying to figure out what the lowest amount of lines (including 
	the Constants) you can use to solve the problem.... So far I get 11. Is there 
	a method to get it even lower?