Well, I've ALWAYS written my stuff so that ISRs are essentially a combination of a trigger response and polling.
Back when I did Intel (or is that letnI? "We are the knights who say letnI, and we demand a sacrifice. We want... A SEGMENT REGISTER!" ) stuff, there was a NASTY bug (er... feature?) in the 8259 in that it would loose the vector for the interrupt request if the pin didn't stay stable and valid through the response cycle. That was discovered where I work when we had an 8048 bang the interrupt on the PC bus. As a result, you'd miss your desired interrupt and instead see a phantom IRQ7.
Well, we had to put a driver on the card to make the interrupt not get missed, but it turned out we were seeing a few other spurious ints on IRQ7.
Then with the Tandy 2000, BOTH the 8259 chips were 'slaved' to the 80186 internal 8259 subsets. Get interrupts at the same time on the same slave and you were dead meat if you did an EOI with another pin still pending on the same slave. (Something IBM didn't do in their PC-AT BIOS!)
As a result, I ALWAYS write my ISRs to handle 'bad' cases. Three parts. Part one, the entry to the ISR. Part two, the EOI (as appropriate) immediately. THEN part 3, which is handling the interrupt. And in that part, I loop until the sources are clear. That is, part 3 checks input status of possible requesting devices, and loops until they are ALL clear. That means ints can stack up and at the same time the ISR is designed from the start to handle a case of a phantom.
I think because I write that way, the 'missing' interrupt doesn't affect me, since I'm servicing the SCI until the channel is clear, and I'm not depending on separate bangs to do each function.
Anyway, what I'm saying is that as assembly programmers, we have differnet mindsets, and we don't see issues that sometimes are hidden in the 'templates' that others use. Unfortunately, sometimes we see issues that the templates are designed to hide. Although I have to say usually Freescale is good about that. I have some hardware I sell with Dallas Semiconductor parts and I found some of their documentation to be flat out wrong. However if you used their 'developement kit', it worked. Was a pain you know where to figure out how it really worked.
Message Edited by mke_et on 05-31-2006 10:35 AM