Modifying the stack like that is an advanced programming technique, and can be used with great success. However, since most PBP programmers find it difficult enough just to successfully author a rudimentary interrupt routine, newbies should avoid it.
A better way for the inexperienced is to sit in a loop and wait for a flag that is set in your interrupt. (A flag is typically a bit variable, changed between 0 and 1.) When the loop detects the flag, jump to your target.
Bookmarks