Everything (test1 and test2) works fine providing the code lays in the first
code segment (code0). It fails for any other segment.
Is there any way to use PC relative offset like
lea.l table(PC),a0 (CW does not accept this syntax)
or any other way to find correct value of table address (for multisegment
application)?
No. The key thing about segments is that there is no fixed relative position between code in one segment and code in another segment. The only way to get the address of something in another segment is to call a function in that segment and have it return the address. Calls go through the jump table and are resolved that way, but taking the address ends up just returning the address of the jump table entry.
-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
