Ned Konz said: > Can't you do a calculated goto (i.e. adding to PCL) and assembly > language? Hi Ned, Yes, it works. However I do have to compile the program, find out where it puts the functions, and then edit the program to set PCLATH accordingly. It is a hack, but it does work, and probably what I will end up doing. However I do not trust it. I suppose it's always good to look at the assembled output and hand step it :) Here's a test that does work: #include unsigned char a; unsigned char b; unsigned char c; void first(void); void second(void); void third(void); void fourth(void); void jumptable(void); void main(void) { c = 3; jumptable(); while (1); } void first(void) { a += b; } void second(void) { a -= b; } void third(void) { a += a; } void fourth(void) { a = a>>1; } void jumptable(void) { asm("movlw 3"); asm("movwf 0x0A"); //THE HACK - LOADING 3 INTO PCLATH asm("movf _c,W"); asm("addwf 2"); //ADDING TO PROGRAM COUNTER asm("goto _first"); asm("goto _second"); asm("goto _third"); asm("goto _fourth"); } -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.