Hello, Dave

I also had this problem when first writing palm apps.  It is most likely
due to the way you are calling build-prc.  The most reliable methods of
building a prc (for me) are using the old style or using a definition
file.  I've found that using the new style sometimes doesn't produce the
right resources.  For example, when I compiled your code, I get

mmc@beland:~$ m68k-palmos-gcc test.c -o test
mmc@beland:~$ build-prc test.prc "Test" "test" test 
mmc@beland:~$ romeo -pD test.prc
- 0x00000000 ----- Database Header --------------------------
  Name                    'Test'
  Attributes              0x0001 [RW.........]
  Version                 0x0000
  Date Created            Wed Mar 21 00:25:57 2001 [0xB6DE1615]
  Date Modified           Wed Mar 21 00:25:57 2001 [0xB6DE1615]
  Date Last Backup        Wed Mar 21 00:25:57 2001 [0x00000000]
  Modification Number     0x00000000
  Application Info ID     0x00000000
  Sort Info ID            0x00000000
  Database Type           appl
  Database Creator        test
  Unique ID Seed          0x00000000
         4 Resources [next 0x00000000]
           idx: offset     size: type  id      Chunk ID  
             0: 0x0000004E   10: code       0  0x00000078 [   24 bytes]
             1: 0x00000058   10: code       1  0x00000090 [  652 bytes]
             2: 0x00000062   10: data       0  0x0000031C [   43 bytes]
                          : 40 bytes of initialized data (40 above A5)
             3: 0x0000006C   10: pref       0  0x00000347 [   10 bytes]

This produces a working PRC which runs fine under POSE.  Calling build-prc
with new-style args gets you:

mmc@beland:~$ build-prc -o test.prc -t "appl" -c "test" -n "Test" test
mmc@beland:~$ romeo -pD test.prc
- 0x00000000 ----- Database Header --------------------------
  Name                    'Test'
  Attributes              0x0001 [RW.........]
  Version                 0x0000
  Date Created            Wed Mar 21 00:28:29 2001 [0xB6DE16AD]
  Date Modified           Wed Mar 21 00:28:29 2001 [0xB6DE16AD]
  Date Last Backup        Wed Mar 21 00:28:29 2001 [0x00000000]
  Modification Number     0x00000000
  Application Info ID     0x00000000
  Sort Info ID            0x00000000
  Database Type           appl
  Database Creator        test
  Unique ID Seed          0x00000000
         1 Resource [next 0x00000000]
           idx: offset     size: type  id      Chunk ID  
             0: 0x0000004E   10:        0  0x0000005A [  648 bytes]

Obviously, this doesn't look right.  In fact, I get the same error as
you do when trying to run it, if POSE doesn't segfault first.  Btw, I'm
using prc-tools 2.0-2.  I'm not sure who the maintainer is, so I haven't
sent a bug report.

Good luck,
Monica

PS - For those of you wondering what romeo is, it's a really cool (in my
opinion) tool for disassembling/building ROMs, and with much more
flexibility and knowledge about PRCs than pilot-file.  Full disclosure:
I'm one of the authors.  We (Rob Johnson and I) put it up on SourceForge,
so please go ahead and try it if you want.  Of course, for the purposes of
this exercise, pilot-file -l works just as well.

On Wed, 21 Mar 2001, Dave Belfer-Shevett wrote:

> Still no dice.
> 
> "UIAppShell" (unkonwn version) has just performed an illegal
> operation.  It performed a "illegal instruction".  If this is the latest
> version of "UIAppShell" please report this to the application author.
> 
> Tried this with 3.3roms and 3.5ez roms.
> 
> Current code:
> 
> #include <PalmOS.h>
> #include <PalmCompatibility.h>
> 
> // -----------------------------------------------------
> // PilotMain is called by the startup code and implements
> // a simple event handling loop.
> // -----------------------------------------------------
> 
> DWord PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags)
> {
>         EventType event;
> 
>         if (cmd == sysAppLaunchCmdNormalLaunch) {
> 
> 
>                 // Main event loop:
>                 do {
>                         // Display a string.
>                         WinDrawChars( "Hello, world!", 13, 55, 60 );
> 
>                         // Doze until an event arrives.
>                         EvtGetEvent( &event, evtWaitForever );
> 
>                         // System gets first chance to handle the event.
>                         SysHandleEvent( &event );
> 
>                         // Normally, we would do other
>                         // event processing here.
> 
>                         // Return from PilotMain when an
>                         // appStopEvent is received
>                 } while (event.eType != appStopEvent);
>         }
>         return ;
> }
> 
> This is silly - the app can't get much simpler, can it?  :)
> 
>                     ______________________________________________________
> -------------------< Biz: stonekeep.com | Hom: homeport.org | Mob: KB1FWR >
> Dave Belfer-Shevett >-------------------^-------------------^------------<
> [EMAIL PROTECTED]  /          Honk if you love peace and quiet.           \
>                    \______________________________________________________/



_______________________________________________
Pilot-unix mailing list
[EMAIL PROTECTED]
http://hcirisc.cs.binghamton.edu/mailman/listinfo/pilot-unix

Reply via email to