Ramel Levin wrote:

> Just created multiple ones and it worked... I guess the compiler is doing
> all the hard work behind the scenes,

You have obviously got your segments organised so that the dependencies between
them are minimal; well done! However I do not think there is any extra work
being done by the compiler given that a small code model means 16 bit
references only. The smart code model will do "hard work".

Of the original author's note, one thing to look at for with any multi-segment
model is reentrancy. Ensure that segment zero contains all of the code that you
need to handle alarms, hotsync callbacks etc. PalmOS/CodeWarrior does not
automatically load the additional segments of your app.

Before giving into a multi-segment model you might also consider using explicit
'far' declarations on those functions that are out of reach. Alternatively (I
have not tried this but I think it should work) use #pragma smart_code around
the calling code block then you do not have to declare anything far and other
16 bit references to the function will succeed. This will keep your code small.

Regards,
--
Christopher Hunt
Class Action Pty. Ltd.

Are you a time zone traveler that owns a Palm(tm) connected organizer?
Check out http://www.classactionpl.com/TimeTraveler/index.htm

Reply via email to