Friday, November 20, 2009 1:04 AM,
I received this email last Tuesday the night before the exam. It is important, but not something that I wanted to distract you with when you were preparing for the exam. So, I pushed it on the stack temporarily. Now the exam is over, so it is perfectly appropriate to share it with you. A student writes: Hello Dr Patt, I just had something on my mind since the last lecture and it has nothing to do with the exam so when you get time feel free to respond. We went over interrupts and handling interrupts according to priority and privilege etc. Well, when you return from an interrupt you use the rti which you said does not have any operands. Now wouldn’t the supervisor stack be considered an operand since it is an abstract data type? Or are the lc3's operands strictly restricted to 16 bit 2’s compliment integers? Those are the operands it supports for all the other instructions in the isa but shouldn’t it include the supervisor stack as well since a part of that isa is working on the supervisor stack during the rti instruction? Thanks, <<name withheld to protect the student who needs the term operand clarified>> Operands usually refer to what is EXPLICITLY part of the instruction. Sure, the supervisor stack is used. However, which stack is used is not part of the instruction. Which stack is used is determined by PSR[15], the bit identifying the privilege level of the code that is running. Also, you can not execute RTI unless you are running with privilege. Make sense? Good luck with the rest of the rest of the course. You are now on the home stretch. Yale Patt