Wed, 2nd Dec 2015, 01:08 Re: Program 5



A student writes:


> Dr. Patt,
> I was working on Lab 5 and I came across a question; do interrupts
> interrupt a trap routine? I think I almost finished my lab, but when I look
> at your screenshots, my program puts "EE306: LC-3" or "EE319K: ARM"
> properly, but does so after a full line. Since I was using Trap x22 to
> output to the screen, would that affect the interrupt or is the LC-3 too
> fast to input a character during a trap command.
> Thank you for your time,
> <<name withheld to protect the student who asks what interrupts interrupt>>


I decided to send this to all of you in case anyone else is confused.
Interrupts are caused by events that happen external to the program that is
running.  The program that is running includes all the routines that are
initiated by the TRAP instruction.  Therefore, yes, interrupts interrupt
trap routines if the event causing the interrupt is of a higher priority than
the trap routine that is executing.  AND, since trap routines are invoked by
the TRAP instruction, it is almost always the case that the trap routine is
executing at the same priority as the program of which it is a part.

Bottom line: A trap routine caused by the TRAP instruction in a priority 0
program will execute at priority level 0.  The keyboard interrupts at priority
4.  You tell me: Does the keyboard interrupt interrupt a trap routine?

Good luck finishing lab 5, and good luck on the final exam.

Oh, yes!  Why doesn't screenshot 2 ever occur?  How many times have you tried?
How many times should you try before you give up trying to get screen shot 2?
I think I will let that one slide for a bit.



Yale Patt