? toggle command is only good for port pins ?
Oh my gosh, you're right! I don't know why I thought that would work for a bit. That fixed it.
THANKS Michael.
Hi Charles,Bruce, could you please explain your comment to me? I would think that PBP knows what bank it is in, and keeps track of that - even in an interrupt handler. Is that not true?
And what constitutes "outside the interrupt handler"? Must all the handler code be placed between the INT entry point and the INT_RETURN?
I have to admit, I have violated your "rule" and it hasn't caused problems. Am I lucky?
Please explain.
__________________
Charles Linquist
Would be happy to answer if you could point me to the inital post...![]()
This is a cut-and-paste from post #2 above.
With DT_INTS using a PBP type interrupt, pretty much anything goes. I.E. use as many
PBP instructions as you like in the int handler.
That's the really cool part of using DTs' int program. He's done all the work for you.
Just don't GOSUB outside the interrupt handler - or it will go-like-splat...
__________________
Charles Linquist
I wanted to clarify a point just to possibly help somebody else...
Unfortunately, TOGGLE does work to change the state of a BIT variable, even though this is an incorrect use of the command! It also quite possibly clobbers some other unsuspecting variable, in this case a LONG. It would be nice if the compiler would flag it, but it doesn't so BEWARE!!
Thanks again, Michael.
Hi Charles,
What I meant was -- you don't want to jump outside an interrupt handler routine - without
returning to it.
I.E. if you GOSUB outside the interrupt routine, and don't re-enter it before your return, you might
experience major problems.
DT_INTS needs to exit from DT_INTS. If you jump outside of this routine, and try to return
from the interrupt on-your-own, you're going to have a problem.
Exit from an interruppt requires a lot of regitsers to be restored.
If you jump outside of the int routine, and return on-your-own, you will for sure see a problem.
Last edited by Bruce; - 29th January 2010 at 08:00.
I.E. if you GOSUB outside the interrupt routine, and don't re-enter it before your return, you might
experience major problems.
Bruce, can you please explain better your statement? from what you said, I understand that the above example code could give problems, while I am using this type of jump out of the interrupt handler, quite often and I never experienced any problem.Code:------------ DT Interrupt handler -------- Get_Byte: do something here If black then gosub apples If withe then gosub peach @ return apples: do something return peach: do something return
Al.
Last edited by aratti; - 29th January 2010 at 08:24.
All progress began with an idea
Bookmarks