Hi Danny,
I just tried SMALL model with a multi-segment app of mine where all segments
are less than 32K and it worked. However, the entire app is also less than
32K, so inter-segment jumps could still be "short" (16-bit direct). This is
what I suspect.
I get it now. "Targeting Palm OS" is correct except when it states that long
jumps are a 32-bit address in Palm OS. What I was wrong about was that you
CAN use SMALL model with multi-segment apps.
Is the following summary correct?
SMALL MODEL
-----------
- All jumps are "short" (16-bit direct). Applies to both intra-segment and
inter-segment calls.
SMART MODEL
-----------
- All intra-segment jumps are "short" (16-bit direct).
- All inter-segment jumps are "long" (indirect, multiple 16-bit). There is a
small performance penalty with these.
LARGE MODEL
-----------
- All jumps are "long" (indirect, multiple 16-bit). There is a small
performance penalty with these.
---
SMALL MODEL IN PRACTICE
-----------------------
- Advice: Use SMALL model when your app is less than 32K.
- Multiple segments are OK.
- The 16-bit "out of range" error can occur on an intra-segment
jump when the segment is larger than 32K.
- The 16-bit "out of range" error can occur on an inter-segment
jump when the entire app is larger than 32K.
- Max segment size: 32K (manual function reordering never required).
64K (manual function reordering may be requird).
- Max app size: 32K (manual segment reordering never required).
It is theoretically possible to exceed 32K.
However, this is generally impractical. To do
so requires tricky manual function and
segment reordering will be required so that
no single intra-segment nor inter-segment jump
is larger than 32K.
- Bottom Line: Keep each segment less than 32K. Keep entire
app less than 32K.
SMART MODEL IN PRACTICE
-----------------------
- Advice: Use SMART model when your app exceeds 32K and you can
keep each segment to less than 32K.
- Multiple segments are OK.
- The 16-bit "out of range" error can occur for an intra-segment
jump when the segment is larger than 32K.
- The 16-bit "out of range" error never occurs for inter-segment
jumps.
- Max segment size: 32K (manual function reordering never required).
64K (manual function reordering may be required)
- Max app size: Essentially unlimited.
- Bottom Line: Keep each segment less than 32K. Entire app can
be any size.
LARGE MODEL IN PRACTICE
-----------------------
- Advice: Use LARGE model when your app exceeds 32K and your
largest segment must be between 32K and 64K.
- Multiple segments are OK.
- The 16-bit "out of range" error never occurs.
- Max segment size: 64K (manual function reordering never required)
- Max app size: Essentially unlimited.
- Bottom Line: Keep each segment less than 64K. Entire app can
be any size.
Thanks.
-----Steve Jackson
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/