On 11/17/06, krishna prasad <[EMAIL PROTECTED]> wrote:
We are developing 68K application on palm and most of the code needs
to be executed during various notification events of palm which sadly
does not provide us the A5 world. This is fine as we do not use globals.
Only problem is that we are restricted to single segment code(<64K of
code), I want to know whether it is possible to have calls across
multi-segments without using the segment table that comes with A5 world
of palm?
Can we write code to specifically find out offset of called function,
push the address to stack and call by popping and execute command?
Yes. Put a "lookup function" as the very first function in a segment
using the link order mechanism in CodeWarrior. Call that function by
locking the segment's resource and using the start of the segment as a
function pointer, perhaps with a little offset to get past any data
stored at the start of the segment. The function addresses will be
PC-resolved in the lookup function since they're in the same segment.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/