[EMAIL PROTECTED] (Gabo) wrote:

> I'm making some test with hackmaster and write this code t try to show an 
> alert for cheking error, but when run on emulator always give me an error 
> "line 1111" or "illegal instruction", but if I remove the call to the 
> routine ShowMyError it work fine.What am I doing wrong?
> 
> Any suggestion will be great.
> Gabo.
> 
> I make with this commands:
> 
> m68k-palmos-gcc -O1 -palmos3.5 -nostartfiles -o code03e8 code03e8.c
> m68k-palmos-obj-res code03e8
> cp code0001.code03e8.grc code03e8.bin
> build-prc -t HACK myhack.prc "myhack" slid   *.bin
> 
> The code is:
> 
> #include <PalmOS.h>
> #include <PalmCompatibility.h>
> #include "sliderhack.h"
> 
> void ShowMyError(Char *s1,Char *s2,Char *s3);
> 
> 
> void MyEvtGetEvent(EventPtr evento, Int32 tiempo)
> {
>     DWord               temp;
>     void              (*oldTrap)(EventPtr, Int32);
>   
> 
>     FtrGet('slid', 1000, &temp);
>     oldTrap = (void (*)(EventPtr, Int32)) temp;
>     
>     ShowMyError("a","b","c");

Problem is here --^^^^^^^^^^^

This is what I was referring to a couple of days ago when I mentioned 
that string literals are not in the code resource. I've run into this 
before, and I mis-remembered when replying to the other query. It has 
something to do with the way that the various pieces are assembled into 
the PRC. By the way, this code looks quite familar -- is it copied from 
my sample hack?

After further reflection, it seems it should be possible to get the 
string literals and other static initialized data (such as initialized 
arrays, etc.) into the code segment with a PC-relative address. John 
Marshall, prc-tools master, can you suggest something?

--
Roger Chaplin
<[EMAIL PROTECTED]>

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

Reply via email to