wouter van ooijen wrote: >> here find an example of how you can solve your problem. >> The code is self explaining... >> You can change the goto with retlw of course but not the order of the >> instructions that do the jump! > > Note that this code still requires that all jump table entries are in > the same 256-instructions page. For a jumptable that crosses a page > boundary (hence for all >256 entries tables) you will have to > calculate the value to load into PCLATH. Unless I'm really missing something here, I don't understand why you say that. His technique takes into consideration that a page is being crossed and appropriately increments PCLATH by 1 when that is happening. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist