At 07:49 2002-10-3 +0200, you wrote:
>Hey,
>
>i want to make a multi-segment app out of my single-segmented.
>My question:
>
>What functions to put in which segements?
>(ok PilotMain and handles of all types in segment-1)
>and the others ... no matter or sort them by some criteria.
>
>Is the multisegmentation only a "technical" thing or does it have any
>consequences while running my app. Where are functions put that
>have no destination-section (given in source)?
>
>Do global variables works as well (my app has many of them :)

In a multisegment application, only the first segment is loaded by the 
OS.  All of the other segments are loaded by the runtime library provided 
by the compiler vendor.  Because of this, you must link the runtime library 
into your first segment.  You will also want to be sure to have PilotMain 
in the first segment, since the runtime will always call this function, but 
the other segments may not be loaded if your application is handling a 
command without access to global variables.

In general, globals work in a multisegment program.  The one exception is 
constant globals.  Depending on your compiler and its settings, these may 
be compiled into the code segment, and would only be accessible from code 
in the same segment as the variable definition.

-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to