Ben,
probably you'll be interested in solution I've used:
Instead of trying to get address of table in any segment I use a call to
fuction which returns me a pointer. That's how it works:
============== in any new segment
asm void GetAddressA0() {
move.l (a7)+,a0
rts
}
asm char * Table() {
jsr GetAddressA0
dc.b 0xFF,0xD1,0xCB, etc.
}
void main() {
char * table;
table = Table(); // now we have a pointer.
}
--
Konstantin
"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 12:39 PM 5/12/2004, you wrote:
>
> No. The key thing about segments is that there is no fixed relative
> position between code in one segment and code in another segment. The
only
> way to get the address of something in another segment is to call a
> function in that segment and have it return the address. Calls go through
> the jump table and are resolved that way, but taking the address ends up
> just returning the address of the jump table entry.
>
> -- Ben Combee, DTS technical lead, PalmSource, Inc.
> Read "Combee on Palm OS" at http://palmos.combee.net/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/