Re: [cc65] some little probs...

Date view Thread view Subject view

From: Piotr Fusik (P.Fusik_at_elka.pw.edu.pl)
Date: 2003-06-24 13:31:11


On Fri, 20 Jun 2003, Ullrich von Bassewitz wrote:

> As I've written before: ca65 will only handle numerical expressions without
> attributes. So it cannot distinguish between the values -1 and $FFFFFFFF (for
> up to 32 bit host machines). While truncating
>
>         val     = -1
>         lda     #val
>
> is acceptable,
>
>         val     = $FFFFFFFF
>         lda     #val
>
> is not, because it may hide errors in the code.
>
In my opinion the solution is simple. Always treat 32-bit numbers as
signed. I don't think anyone ever wants to use 32-bit unsigned numbers in
6502 code.
So, accepted ranges could be:
lda zpage: 0 .. $FF
lda #imm: -$80 .. $FF
lda abs:   0 .. $FFFF
etc.
That's how xasm works.

Bye,
Piotr

----------------------------------------------------------------------
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-24 13:32:29 CEST