Sun, 8th Nov 2015, 20:45 Re: EE306 Help
A student writes: > Hi Dr.Patt, > > I was working on the 2002 practice exam when I came upon something fishy. > Here at the bottom of the email, I have attached a picture of the problem. > 1st: why is R3 xA404? Shouldn't it be xA402 because of the instruction, > LDR R3, R0, #2 with R0 being xA400? Unless there's something I'm missing. > 2nd: Could you explain how R1 becomes x2201? > 3rd: Since there is a breakpoint at xA404 shouldn't the LC-3 stop and not > read that instruction hence making R2 null? > > Best, > The student who can't take tests to save her life Another student who denies me the luxury of coming up with an alias for her! This one is embarrassing, because the student is right: Something is fishy! In fact, the solution sheet is wrong! ...which I discovered when I went back and worked the problem just now. Amazing! This solution was posted by one of my TAs back in 2002, and we are just catching it now. And, of course, since it happened 13 years ago, I long ago forgot which TA did this. The good news: the student saw something was fishy, told me, and it is being corrected right now. The reason I decided to send this to all of you is to reinforce that we are all human, so if you find a solution that looks "fishy," it could be wrong, so please let me and/or a TA know so we can check to see if you are mistaken, in which case we need to teach you what you are missing, or we have posted an incorrect solution. It is NOT always the case that our solution sheets are perfect. Sorry you have to find this out. Almost as bad as when you learned there was no Santa Claus. :-) Good luck on the midterm next Wednesday. Yale Patt