Re: [cc65] Best way to get aligned memory...

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-01-19 12:40:07


Hi!

On Thu, Jan 16, 2003 at 12:17:19PM +0100, Christian Krüger wrote:
> will not work (cc65 2.9.0) (_buffer seems to be zero), and I'm not
> sure if it could work.

Greg has already posted the solution (using .AND was wrong, use .BITAND
instead).

> In my understanding the value of 'buf' can only resolved by the linker,
> so the '_buffer' equation have to be also done by the linker?
> Is the linker capable resolving assembler equations?

One of the basic design decisions when writing the tool chain was that the
linker must be able to resolve arbitrary expressions. This is one of the
reasons why I didn't use an existing object code format (I did evaluate o65 at
that time but decided against it), because the assembler stores complete
expression trees in the object files for evaluation by the linker.

There are some limits, for example it cannot insert space within a module,
because some address calculations are already done by the assembler, but apart
from that it is able to evaluate any expression that you can enter in the
assembler. If you find a place where this does not work, it is either one of
the exceptions or an error and should be reported as a bug.

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-01-19 12:40:13 CET