Reply by pdj...@blueyonder.co.uk October 26, 20092009-10-26
Hi Christian

Thanks the > did the trick.
Pity I have a big pool of 56000 source code that doesn't need the > so I'm going to have to go through and edit it all.

Thanks

Pete

Hi All
>
>I'm using Symphony Studio Eclipse 1.1.0 and having problems setting values (but only if they are below 255). It seems to left shift the value by two bytes.
>
>i.e.
>
>Fred equ $70
>
>or
>
>move #$70,x1
>
>when used, comes out as $700000 when read from the chips ram or chips registers.
>
>Even
>
>Fred equ $000070
>
>comes out as $700000.
>Anything above $ff works as you would expect ie $100 becomes $000100
>
>I even tried
>
>Fred equ $100070 - $100000 and it still comes out as $700000
>
>Experimentation has shown that the wrong value is really being sent to the chip and that what is being read back from the chip is telling the truth.
>
>Any ideas or even a useable get round?
>
>thanks
>
>Pete
Reply by Christian Langen October 12, 20092009-10-12
Hi Pete,

just try to right justfy your numbers:

Fred equ $70

Instead of typing

move #$70,x1

do

move #>$70,x1

or

move #>Fred,x1

to get x1 filled with $000070.

Its just the way the Motorola DSP56k Assembly works.

The reason ist that the 56k is designed to handle left justified two's complement numbers mainly. You have to tell it that you want to have the numbers interpreted as fixed point.

The device is not storing wrong numbers but just rounding the unused zeroes. The '>' symbol right alignes the numbers.

Best regards

Christian

> Hi All
>
> I'm using Symphony Studio Eclipse 1.1.0 and having problems setting values
> (but only if they are below 255). It seems to left shift the value by two
> bytes.
>
> i.e.
>
> Fred equ $70
>
> or
>
> move #$70,x1
>
> when used, comes out as $700000 when read from the chips ram or chips
> registers.
>
> Even
>
> Fred equ $000070
>
> comes out as $700000.
> Anything above $ff works as you would expect ie $100 becomes $000100
>
> I even tried
>
> Fred equ $100070 - $100000 and it still comes out as $700000
>
> Experimentation has shown that the wrong value is really being sent to the
> chip and that what is being read back from the chip is telling the truth.
>
> Any ideas or even a useable get round?
>
> thanks
>
> Pete
Reply by pdj...@blueyonder.co.uk October 11, 20092009-10-11
Hi All

I'm using Symphony Studio Eclipse 1.1.0 and having problems setting values (but only if they are below 255). It seems to left shift the value by two bytes.

i.e.

Fred equ $70

or

move #$70,x1

when used, comes out as $700000 when read from the chips ram or chips registers.

Even

Fred equ $000070

comes out as $700000.
Anything above $ff works as you would expect ie $100 becomes $000100

I even tried

Fred equ $100070 - $100000 and it still comes out as $700000

Experimentation has shown that the wrong value is really being sent to the chip and that what is being read back from the chip is telling the truth.

Any ideas or even a useable get round?

thanks

Pete