> > ShowMyError("a","b","c");
>
> Problem is here --^^^^^^^^^^^
How is the problem here? That is, how does the above line lead to the errors
Gabo reported getting?
> 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?
I'm no gcc expert, but John Marshall just posted in another thread ("Re: strings
and string lists" on 9/20) that "GCC stores string literals directly in the code
by default...", so I'm not even sure that the reference to "a", "b", and "c" are
even wrong in this case.
-- Keith Rollin
-- Palm OS Emulator engineer
"Roger Chaplin" <[EMAIL PROTECTED]> on 09/21/2000 07:11:40 PM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: "Roger Chaplin" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (Keith Rollin/US/PALM)
Subject: Re: Line 1111 or Illegal instruction error
[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/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/