Hi Scott, > Andy, > > Why do you want to do this? Are you running out of stack? > Well I'm building a small cooperative RTOS for use with CCS and this is one of several possible task switch mechanisms I'm playing around with. I've got the thing working fine and now I'm into the "If I just change this I can make it much smaller/faster/neater" stage and it is really bugging me that I can't find a way to do this! Andy -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.