I've been writing an ARMlet to take care of a maths-intensive portion of a
program I've been working on -- on ARM processors, it is run instead of
the native 68k version.

I have the whole thing working correctly, except for one little piece.

The original code takes the result of its calculation, and then uses that
value as a lookup into a very large table which is compiled into the
program as a global array.  A pointer to that array is included as part of
the structure passed to my ARMlet.


I seem to recall hearing that ARMlets have no access to globals -- I hoped
that I could work around that by passing the pointer in.  Is that not the
case?  Do I need to move that massive global array into a resource or a
record in order to access it from my ARMlet?


The code currently looks something like this:

UInt16 * table = Read68KUnaligned32( &data->m_table );
/* calculations... */
UInt16 shortValue = table[index];
UInt16 swappedShortValue;
ByteSwap16( &swappedShortValue, &shortValue );
Int32 result = swappedShortValue;


Read68KUnaligned32 is as copied from the PalmOS Companion. ByteSwap16 is
my own byte swapping macro that swaps from the address in the second
parameter into the address in the first parameter.


Thanks in advance for any help anyone can offer..

Trevor Powell

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

Reply via email to