OK - I figured out the difference.
I copied your code and compiled and got
30: (*jumptable[1])();
0003 5502 [4] LDHX jumptable:2
0005 fd [4] JSR ,X
Apparently, the difference is that I have selected the TINY memory model, while you had the SMALL model. When I change to SMALL, I do get
37: (*jumptable[1])();
0012 ce0002 [4] LDX jumptable:2
0015 89 [2] PSHX
0016 8a [2] PULH
0017 ce0003 [4] LDX jumptable:3
001a fd [4] JSR ,X
which is what I want.
This is what I find in the help file under "TINY memory model":
In the TINY memory model, all data including stack must fit into the zero page. Data pointers are assumed to have 8-bit addresses if not explicitly specified with the keyword __far. The code address space is still 64 kB and function pointers are still 16-bit large. The TINY memory model is selected with the -Mt compiler option.
Can't I force the 16-bit address for array jumptable? I haven't figured out how, but I would think I should be able to...
Otherwise, I'll have to figure out what other effects changing to "SMALL" would have on the rest of my code.
Carlos