PARM is a tiny compatibility environment for writing ARM native applications using prc-tools, running (supported by PEAL) under CygWin or Linux, based on xWords.

First of all, I expect you to setup CygWin or Linux, prc-tools, the PalmOS SDK and PEAL on your own. On each site there are plenty of good howtos, so there's no need for me to write all that once more.

Installation of PARM is pretty straight forward once you've set up all of the above (except xWords of course): Just extract PARM.zip somewhere inside your CygWin directory (anywhere on Linux), then modfiy makepno.sh to reflect the paths on your system:

SDKBASE: Run "palmdev-prep -v" to get that path. The line "Parsed trap numbers in ..." contains the path (up to "include").

PEALMAIN: Has to be changed to wherever you've installed PEAL.

The Rest only has to be changed if your project directory is not one level below the PARM installation directory. In this case you have to change all paths that contain ".." as well.

 Finally, you have to change pealexample.def to include name and creator id of your programm.

To test it, launch CygWin/Bash and go to the example directory inside the PARM directory. Remove out.prc with "rm out.prc", since that's what we're trying to build, then run "./makepno.sh" (which has no output to the console). If you did everything correctly, you should now have a file "out.prc" in your project directory which when run should output the namesof all applications in RAM...

You should be able to adapt the example's build process for your own projects quite easily.

One last warning: PARM is NOT complete... most noticable is probably the absence of most Form operations... however most other functions work. Just have a look at pace_gen.c to see if the functions you need are there. If they are not, you should be able to add them for functions with simple return types quite easily. The structure of a pace_gen.c entry is as follows:

 

/*Prototype*/ 

void WinGetDisplayExtent( Coord* extentX, Coord* extentY ){

/*Swap ins if the parameters are pointers to data that can be read by the function: SWAP2 for 2 Byte data (UInt16) SWAP4 for 4 Byte data (UInt32).*/

    SWAP2_NON_NULL(extentX);
    SWAP2_NON_NULL(extentY);
    {
/*Set size of all parameters*/

        STACK_SIZE( 8);

/*Add parameters to stack. The last parameter is the offset. The first parameter always starts at 0, if it is 2 bytes in size, the second one starts at 2. If that one is 4 bytes in size, the next one starts at 6 and so on and so forth*/

        STACK_ADD32( extentX, 0);
        STACK_ADD32( extentY, 4);
  /* Finally we actually run the function: the first word is the trapnumber, usually just sysTrap+functionname, the second one is again the size of the parameters.*/

        STACK_RUN(  (sysTrapWinGetDisplayExtent), 8 );
 /* And if the function was suppossed to return something into the blocks our parameters point to, we have to swap it again.*/

        SWAP2_NON_NULL(extentX);
        SWAP2_NON_NULL(extentY);
    }


Hope that helps. Hans.