> From: Oz Shalbar [mailto:[EMAIL PROTECTED]] > I'm writing a multiple segment application, and I want my > second segment to have access to the basic functions of > StartupCode.lib , like __ldiv__ / __lmul__ . StartupCode.lib does not support multi segment applications. The "MSL Runtime Palm OS (Xi).Lib" library is for multi segment apps. It contains the same math functions you need. > this lib has to be in the first segment, and it cannot exist in > both segments. how can I solve this problem, so I can use > multiplication/division operands in the second segment ? Just switch to the library mentioned above. Then everything should just plain work. The startup code contains sufficient magic to enable inter-segment calls, including calls from your 2nd segment to the math functions in the 1st segment. The only limitation is that code in the 2nd (3rd, etc) segments cannot be called from one of those launch codes that doesn't support globals variables. (The whole inter segment jump mechanism uses global data.) This is all documented with CodeWarrior. > Another question is, do multiple segments mean multiple > memory chunks ? The answer should be positive, since they're > supposed to solve the 64K limit of a chunk. Well, each code segment _is_ a resource in your application, therefore a memory chunk in the storage heap. > But then, if I do: DmGet1Resource( 'code', 1 ); > I get a handle to the first code resource in my application. Well yes, but it's very unlikely you really need to do this. > how do I get to the second segment ? What am I missing ? You don't need to "get" anything or do anything special for a multi segment application. Just change your startup library and it will do all the segment loading magic for you. -slj- -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palm.com/devzone/mailinglists.html
