Mon, 28 Nov 2011, 00:33
Another email on Program 5 which I think has some elements that I should share with all of you. A student writes: > Good evening Dr. Patt, > > I just started working on Program 5 this evening, and it may be because my > brain is still recovering from excessive turkey and stuffing consumption, > but I'm having trouble processing what assumptions I am to make about some > of the values inherent to the program. > > If I am correct: His first two bullets give away part of the solution to the exercise so I am deleting it so as to not spoil your fun. > 3. I do not need to concern myself with the process of initiating the > interrupt, meaning the 7 step process outlined on page 544 of the book. The > LC-3 will take care of that itself and I do not to write code to accomplish > this. True. > 4. While I cannot make any trap routine calls inside of my interrupt service > routine code, there is nothing stopping me from copying the code inside > those trap routines, editing where appropriate (such as saving registers), > and pasting the result into the interrupt routine code. That depends on what code inside your trap routines you copy. If you copy code from the trap routines that is unnecessary and serves to demonstrate that you really do not understand the difference between how a trap routine handles a keyboard character being typed and how an interrupt routine handles it, then yes, you will lose points. > If these assumptions are accurate, then I have already finished both of the > programs in somewhere under 2 hours before testing and debugging, even with > my desktop blue-screening three times during the process and losing half of > my progress. Before testing and debugging? Sometimes testing and debugging can take a lot more time than initially writing a program, but let's move on. > In short, I just caught myself thinking "This was too easy, there must be > something I'm actually doing horribly wrong." and figured to contact you > about it. No, many students are able to get this done in a couple of hours. I wanted to be sure that before you leave EE306, you understand how interrupts work and Lab 5 accomplishes that without requiring you to write a lot of code. So, yes, if you understand the concepts discussed in class and written up in Chapters 8 and 10, sure, a couple of hours is often enough. There is no deep trick embedded in Lab 5 that you are missing. > Other than that, I hope you enjoyed your holiday. I did. And, I hope you did also. > Thank you for your time, > <<name withheld to protect the student who thinks he is suffering from too much turkey>> Good luck with the final exam. See you in class. Yale Patt