Yes, I have segmented the app. Someone else told me that his problem went
away when
all of his segments were smaller than 40k or so. So I re-segmented all of my
segments to
be smaller than 40k. But I am still having the same problem.
And no, the "Link Single Segment" option is not set.
I noticed that if I move my files/segments around and put the function
closer to the caller,
(even in a different segment) the problem goes away (for that particular
function).
However, it is still having problem calling function in 3~4 segments away.
(my app is pretty close to 700k and I have 15-20 segments). I am in the
process of rearranging
all the segements/files to be much closer..But I know I can't do this for
the whole app
because the app is so huge and it is almost guaranteed that some function
will call another function far far off..
I thought that code warrior will create jump table for all functions in all
segments and it doesn't require
anything more coding from me other than making segments that are smaller
than 64k.
But then again, I am sure I am wrong since if cw created the jump tables,
there wouldn't be
documents like this: http://oasis.palm.com/dev/kb/faq/1418.cfm which
describes how to
create your own dynamic jump table =)
If someone can correct my assumtion about the jump table stuff, please do
so.. I am totally lost.
Thanks!
-Ji
"Jun-Kiat Lam" <[EMAIL PROTECTED]> wrote in message
news:41181@palm-dev-forum...
>
> I apologize for asking the obvious, as you may have already done this, but
is
> your app already multi-segmented? There is no option in the MSL, compiler
or
> linker that will automatically segment your app for you - you have to do
this by
> hand. Check out the Targeting Palm OS docs, the Multi-Segment project
stationery
> or the forum archives for more tips on creating a multi-segment
application. If
> your app is already multi-segmented, then the problem may be either that
you
> have 'Link Single Segment' checked in the 68K Linker panel (which should
be
> off), or elsewhere in your code, in which case you might have to
unfortunately
> poke around further or post some code snippets.
>
> Hope this helps.
>
> -- jkl
>
> ----- Original Message -----
> From: "Ji Lee" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 27, 2001 3:20 PM
> Subject: Multi-segment app
>
>
> > Hi all,
> >
> > I am having problem running a rather huge app. I know that I can use
"Smart"
> > code model (CW) and
> > MSL runtime library to build an app bigger than 64k, but somehow I still
> > can't get it to work.
> > Everytime the program tries to call a function beyond the first 64k
segment,
> > the emulator goes
> > "... is attempting to change the emulated program counter to 0x00000052.
> > This address is invalid
> > because it's not in a vaild memory chunk. ..". I thought MSL library
> > contains code that will allow
> > jmp beyond multiple segments and etc. The program was launched with
> > sysAppLaunchNormalLaunch command, so global variables needed for the jmp
> > should be available..
> >
> > Please let me know anything I might have missed or any documents
describing
> > how it works in more
> > detail.
> >
> > Thanks!
> >
> > -Ji
> >
> >
> >
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
please
> see http://www.palmos.com/dev/tech/support/forums/
> >
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/