In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Chong wrote: Is it possible to exit an ISR with a JMP to a label in the main program instead of returning to the point of interruption? I'm working on a device which needs to move to the beginning of either of two loops in my main on the detection of either of two input pin conditions. rb.0 - mode switch rb.1 - input signal pin rb.0 will be connected to a mode switch which will jump to either of two main loops in my main body. The beginning of one loop will disable the interrupt for rb.1 so the mode loop can execute despite changes to rb.1. The beginning of the loop will also reconfigure the rb.0 interrupt conditions to detect the switch being moved back and run the ISR again. rb.1 run the ISR to start a second major loop which polls the status of several other data pins. Basically I'm hoping to use the ISR as a rapidly callable routine to switch between program modes without having to poll pins throughout my program operation to change operating modes. Will I run into problems if the register that RETI points to isn't cleared if RETI isn't used to return to the main? ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=103601 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)