Re: [cc65] Hello and ca65 questions

From: 42Bastian Schick <bastian421monlynx.de>
Date: 2005-05-09 15:57:11
Hoi Ullrich,

> Not really. ca65 is a one pass assembler, and as such delays evaluation 
> of
> many expressions until end of assembly. If the expression changes several
> times, which one should be evaluated in the end?
>
> In general, there's a problem with forward references and variables. As 
> an
> extreme example, how should the following get evaluated?
>
>         foo = bar + 10

Currently I check if the expression is constant, thus contains no forward 
reference.

But you have this:

	.repeat 10,I
	lda #<(cd+I)
	.endrep
cd:

This generates correct code because you take I as constant (you are 
replacing
the variable-reference by the value).

So I am investigating, why

I == 1 ; constant, obviously
	lda #<(cd+I)
Simplifying the expression should give cd+1 here, I am searching why not ?



-- 
42Bastian Schick
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon May 9 15:57:23 2005

This archive was generated by hypermail 2.1.8 : 2005-05-09 15:57:25 CEST