10/23/2006


A student writes:

        Dr. Patt,

        This question may seem quite unproductive, but...

No question is unproductive if the answer to it will help you 
understand what is going on  ...IF you have been paying attention 
in class, paying attention in discussion session, and reading 
the book.  Assuming all three are true, the question is very
productive and I hope to help you understand. 

        The first hint on programming assignment 2 seems a little confusing.
        I cannot think of any way to implement a step-by-step procedure to find
        the lowest ASCII code character, and the process just gets more
        complicated with repeats of a character. 

The hint is:  How would you find the smallest character in the array?

Perhaps we need to expand the hint.  We have a one-dimensional array 
of characters in memory locations x30F0 to x30FF.  That is, each memory
location in that range contains the ascii code of one character.  What
would we have to do to find the smallest of those 16 ascii codes?

        Does that method have anything to
        do with the "finding the occurrences of a character" program that was
        mentioned in the book?

        Thank you.
        <<name withheld to protect ...>>

Does it have "anything to do"?  That is a pretty vague question.  Are there
things about a program that finds "occurrences of a character" that can be
of use here.  Sure.  And there are things that are also very different.
But let's think about the things in that program that are the same as this
one.  What is the "occurrences" program asking the computer to do?  How does it
do it?  

I would like to lead you step by step through this so you will understand it,
but that is hard to do via email.  If my comments above clear it up, great!
If not, please see any one of the ten TAs during office hours and they will
explain it to you.  And, if that does not work, please see me.

Good luck understanding the hints and completing the program.

Yale Patt