Reply by jdw_atx February 10, 20032003-02-10
Simon,

Most likely the jmp takes you to an area outside of the scope of the
current function. CodeWarrior for DSP56800's inline assembler does
not support branch labels outside the scope of the current function.
These kinds of tasks should usually be done in the standalone
assembler which has a more feature-rich assembly language syntax and
functionality.

Hope this info helps!

Regards,
John

--- In , "Simon Lightbody"
<Simon.Lightbody@p...> wrote:
> Anybody got any idea on why this line won't compile (Codewarrior
version 4)...
>
> asm(jmp $1000);
>
> If tried various combinations (0x1000, #$1000, #0x1000, etc.)
> Appears it might be a compiler bug...any ideas for a workaround?




Reply by Yochum, William February 10, 20032003-02-10
I don't think it likes the "jmp" instruction.

The following construct works:
((void (*)()) 0x1000)();

But it creates a stack frame followed by "rts" rather than using a "jmp".

-----Original Message-----
From: Simon Lightbody [mailto:]
Sent: Friday, February 07, 2003 6:38 PM
To:
Subject: [motoroladsp] asm problem 56F803 Anybody got any idea on why this line won't compile (Codewarrior version
4)...

asm(jmp $1000);

If tried various combinations (0x1000, #$1000, #0x1000, etc.)
Appears it might be a compiler bug...any ideas for a workaround?

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp
<http://www.yahoogroups.com/group/motoroladsp>

More Groups: http://www.dsprelated.com/groups.php3
<http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/> .


Reply by Wim de Haan February 10, 20032003-02-10
Hello Simon,

The same bug in Codewarrior v5

Workaround 1: // This behaves as jsr $1000 with 11 instructions (13 words)
((void (*)(void))0x1000)();

Workaround 2: // This behaves as jmp $1000 and takes 4 instructions (6
words)
asm(move $1000,x0);
asm(push x0);
asm(push sr);
asm(rts);

Kind regards,
Wim de Haan Exendis B.V.
W.J. de Haan
P.O.box 56, 6710 BB Ede
Keesomstraat 4, 6716 AB Ede
The Netherlands.
Tel: +31-(0)318 - 676305
Fax: +31-(0)318 - 676319
mailto:
URL: http://www.exendis.com <http://www.exendis.com/>

-----Original Message-----
From: Simon Lightbody [mailto:]
Sent: zaterdag 8 februari 2003 0:38
To:
Subject: [motoroladsp] asm problem 56F803 Anybody got any idea on why this line won't compile (Codewarrior version
4)...

asm(jmp $1000);

If tried various combinations (0x1000, #$1000, #0x1000, etc.)
Appears it might be a compiler bug...any ideas for a workaround?


Reply by Simon Lightbody February 8, 20032003-02-08
Anybody got any idea on why this line won't compile (Codewarrior version 4)...

asm(jmp $1000);

If tried various combinations (0x1000, #$1000, #0x1000, etc.)
Appears it might be a compiler bug...any ideas for a workaround?