On Sun, 14 Mar 2004 03:09:53, Trevor Powell wrote: >>> So there you have it. Can't access 68K global data from an ARMlet, even >>> if you pass in a pointer to that global data. Should have guessed, I >>> suppose! :) >> >> thats a wrong statement. we do it all the time. you just didn't figure it >> out. >> however, the solution you had for your lookup table also works fine. > >Interesting. > >Odd that the code didn't work with a pointer referencing global data, but >worked correctly when I passed in a pointer referencing runtime-malloc()ed >data.. That makes it sound like a data alignment problem, but I thought >I'd been very careful in handling that situation...
If you ask about this issue or check the archives on the correct forum, the pno-forum (formerly the armlet-forum) you will find that this has been discussed in detail. http://www.escribe.com/computing/poaf/index.html Some 68k compilers (e.g. both CW and gcc as commonly configured) will put pointers and global/local long ints on short int boundries. Check in your 68k code: If ((UInt32)myGlobalPointer & 0x00000002L) != 0, your ARM code will crash. Pointers returned by malloc on Palm OS 5+ won't have this problem. IMHO. YMMV. Ron Nicholson HotPaw Productions http://www.hotpaw.com/rhn/palm -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
