Hi Steve, You can pretty much do the same jump table as you might got used to it on the 16F using math operation on the PCLATU:PCLATH:PCL, except that: 1. On a 18F the addressing of he program memory is in bytes, not in words -- and as 1 word is 16 bit on a 18F you need to count 2 bytes per instruction 2. However, there are 2 word sized instructions such as GOTO, CALL, MOVFF etc (use BRA and RCALL instead if you can) 3. You may also want to study the CALLW instruction which is a good thing in many times Tamas On 15 January 2012 13:19, M.L. wrote: > On Fri, Jan 13, 2012 at 2:43 PM, Steve Willoughby > wrote: > > I'm trying to implement my first PIC18 project (after spending all my > > PIC work so far in the PIC16 family). So far it's a big improvement bu= t > > I'm having a little trouble figuring out the best way to do jump tables > > in this architecture. > > > > I have three questions around this which I haven't seen anything > > specific to the PIC18 family in my searching so far: > > Steve, > One thing I would recommend is using the MPLAB simulator to step > through your code. This should work very well for illustrating what > the PIC is doing internally. > > -- > Martin K. > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .