Fri, 25 Nov 2011, 19:53


Hope you all enjoyed the day yesterday.  This message you can read when
you get back to work.  Since some students are already starting to work
on Program 5, I thought I would respond to this email to all of you.

A student writes:

> Dr Patt,
> 
> I've (sort of) completed program 5.   My output however, isn't identical to
> yours.   My interrupt program is interrupting the UT checkerboard program
> and outputting whatever letter is typed 10 times, but I have made my
> program output .STRINGZ   "UT    UT    UT    UT    UT    UT    UT    UT"
> etc and not each letter individually.   

It looks like you have a fundamental misconception.  Do you think 
YOUR program is outputting the whole line at one time, or do you think 
your program is outputting to the screen one character at a time?  
Answer: your program is outputting to the screen one character at a time.
If you do not understand why this is, you need to think about it some
more.  If, by Monday, you still do not understand why this is the case,
please ask me at the start of class.

> I'm guessing, after having looked
> at your sample output, that you want us to output each letter and space
> individually, since your "interrupting" letters sometimes appear in the
> middle of lines.
> 
> I just wanted to clear this up, since in the description you say
> "alternately outputting two different lines", yet the sample output
> indicates that you have done so letter by letter.
> 
> Also, is polling the KBSR acceptable in the interrupt program?   There
> wasn't any explicit mention of it, so I assumed it was ok and made my
> program accordingly.

Why would you want to poll the KBSR?  What is the purpose of polling the
KBSR?  Why is this not necessary in this assignment?  ...and therefore,
very much NOT OK.

> Sorry for the long email, I hope you can help.

The length of the email is fine.  I hope the above does help,
although it is true I did not just give you the answer, preferring
(at least right now) to have you think it through for yourself.

> Thank you,
> <<name withheld to protect the student who needs to understand *interrupts*>>

Good luck finishing Lab 5, and completing 306 with an excellent performance
on the final exam.

Yale Patt