Hi

Both the palms I've seen are M68k-based.

Are all PalmOS devices M68k-based?
Do their API functions have the same stack frame structure?

I ask because I'm about to write a low-level assembler routine to act as
a universal wrapper for the whole PalmOS API.

>From C, the routine will look like:

call_api_func(void *funcaddr, int num_args, int retval_size,
              int arg1_size, int arg1_value,
              ...
              int argn_size, int argn_value)

The routine will then analyse these args, and set up a stack frame
appropriately for whatever API function it's calling, call that
function, then pass the return value back to its caller.

For example, it will be possible to have a statement like:

   nchars = call_api_func(FldGetMaxChars, 1, 2,
                          4, fldPtr);

Does such a function already exist in some form, to save me the trouble?

Is there any thing I should watch out for if I go ahead and write one
myself?

Cheers
David



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

Reply via email to