| ??? 12/05/00 12:56 Read: times |
#6983 - RE: High level interrupt |
Hi all
I agree with Post, Hans and Peter. Yes this does not make sense to agree to all at the same time. But before I explain let me say something. "Trying to fool the stack that way while returning from ISRs during interrupt(s) is not a sign of good programing practice at all." This clearly shows one is not capable enough to handle the situation being within the set rules of the game. The rules set by Intel I agree with Post: ================== Yes I had once used the same "trick" when I could not handle the situation to redirect the control to where I wanted after the RETI. I cleared the stack and pushed the new destination address and it worked 100% well (apparently at least). But tell me how many times within a code you would want to or you could afford doing it, I mean cheating the stack. I believe one would end up having garbage on hand instead of the working code. You never know what's happening at the particular moment when interrupt occured ?? That's why the easy way is to plan your code without letting this need to arise. QUESTION FOR ALL:::: ===================== I am a begginer and used this trick only once. How many of you have used this way of programing in your life time. That will tell how popular or wise it is to use that way. I agree with Hans: =================== I think you said somewhere in above postings that it might enter into a number of unexplainable possibilities. Yes I agree and not necessarily it will make the code crash or misbehave immediately. (that's why I and Post are mistaken to believe that this trick works) Probably you destroyed some of registers and which might cause a crash a month after... or never God knows. I agree with Peter: =================== It might work as long as only one interrupt is involved. But going back to the original posting that asks about interrupt within the interrupt which sets two (02) flags internally. Yes I agree that without clearing two (02) flags how can we satisfactorily come out of two interrupts. The answer is two RETIs. At the face of it Peter's point is very convincing. Steve would confirm by reporting. FINALLY: ======== I owe my skills, whatever the level is, to this forum and to all of you. I cannot see you abusing eachother. Post, can you do postings on a German forum as good as Peter is doing on this english forum. I cannot, so its simple, Peter is better than me. This is a place where novice learn. Please demonstrate the correct approach and code example here on the forum so that it might demistify the confusion. I request Craig to come forward to say something on this approach and let the begginners know whether to use it or not. Please do not let this thread fade away into scroll without a solution. Simon |



