I really don't understand what you are trying to do. Can you state more of your requirements? Are you trying to do ASM in C? Do you want to stick with strictly software interrupts? With HiTechC, I write a function like this: void interrupt isr(void) { } And when the hardware interrupt is called, it goes there right away, with mostly a branch penalty and a few context save instructions. If that's not immediate enough, ASM won't help much there. And when the interrupt is done, it will pick back up right where it left off, with only a very few instructions of penalty to restore everything. Of course, the code in the chip must enable the interrupts, and the ISR code must clear the particular device's interrupt flag before it will re-interrupt. You can play a little with turning on and off the interrupt enable depending on what part of your code you are in. Jeff ----- Original Message ----- From: Gordon Varney > I am using CCS, I need to enter a loop, do the loop until the interrupt. Exit the loop, do whatever, then > restart the loop. > What is the best way to exit the loop in the middle of the loop, regardless of the status of that loop? > > > SETUP_TIMER_0(100) file://start timer 0 at 100 > > PART_1 > DOTHIS > COUNT_10 > GOTO PART_2 > > PART_2 > DOTHAT > COUNT_10 > GOTO PART_1 > > INT_ON_TIMER_0 file://interrupt on overflow > ? file://Must exit PART_1 and PART_2 > file://in order to restart from beginning of PART_1 > > PART_3 > DOWHATEVER > GOTO PART_1 -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads