Re: [cc65] some little probs...

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-06-26 12:13:38


On Wed, Jun 25, 2003 at 02:09:38PM +0200, Piotr Fusik wrote:
> I just don't understand, why Ullrich said that assembler doesn't
> distinguish between -1 and $FFFFFFFF. So, how the division operator works?

This is a good question, because it shows some deficiencies. The answer is
that the assembler uses "long" arithmetic of the C compiler. Which means that
the results depend on the host machine: On machines where a long has 32 bit,
some operations on 32 bit unsigneds are wrong, while the same operations work
on machines where a long is larger than 32 bit.

I don't think it's an urgent problem, but I will have to think about it. For
now, I will introduce a new

        .feature        relax_conversions

which will cause the assembler to silently truncate negative values when
necessary. Most people should be able to live with that solution, at least
it's better than now.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-06-26 12:14:38 CEST