"Steve Jackson" <[EMAIL PROTECTED]> wrote in message
news:13406@palm-dev-forum...
> - You need to specify the "smart" or "large" code model (see the 68K
> Processor pane in your project settings). With "smart" model, jumps within
a
> segment are 16-bit. Jumps between segments involve multiple jumps to get
> there (handled automatically for you by CW).
I don't think this is correct. My understanding is:
- "Small" uses short intra-segment jumps and long inter-segment jumps.
- "Smart" uses short intra-segment jumps only when jumping backwards (or
forwards within a routine) and long inter-segment jumps.
- "Large" uses long jumps everywhere.
If you only have one segment, all jumps are intra-segment.
You can use the "Small" code model in multi-segment applications if you
don't let your segments get too big.
Note that there is some run-time library code for long math at the start of
the segment, so any code that uses this must be in the first 32K. Indexing
arrays of structs will often result in long math. Also note that code used
for launches OTHER THAN sysAppLaunchCmdNormalLaunch and
sysAppLaunchCmdGoTo-with-globals (ie. with the sysAppLaunchFlagNewGlobals
flag set) has to be in the first segment.
> - Each segment can contain one or more "xyz.c" source files in it. As your
> segments grow, you just create more segments to keep each of them below
64K
> in size.
With the "Small" code model, you'll want to keep them closer to 32K.
--
Danny Epstein
OS Engineer, Palm Inc.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/