Harold Hallikainen wrote: > The NextTask() is typically in a loop where we're waiting for input. > It can be several subroutines or function calls down. Local variables, > however, have to be static. Automatic variables get pretty confused > when you go through a task switch. > > It's pretty much working, but I want to do some more testing. I'll > post it when I'm done. Since there seems to be interest, I've added my version of this to the PIC development tools release at http://www.embedinc.com/pic/dload.htm. After installation look at source\pic\qqq_task.aspic. This version can be configured for normal and C18 FSR usage, and some instructions are eliminated when built for PICs with 32Kbyte code space or less. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist