Re: [cc65] ca65 syntax problems

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-11-07 11:56:33


On Tue, Nov 06, 2001 at 02:00:23PM -0600, Mike McCarty wrote:
> Suppose there is a structure which is being built, which has pointers
> to various other places in the code. One can then put the
> initialization for that structure in the source where the various
> things are created.
[...]
> In this way, file1.asm does not have to have embedded knowledge of the
> names of the external addresses used, or even which ones are actually
> present.

Well, yes. One could use it for this purpose. But the problem is rare and can
be solved by other means.

> Another, more mundane use, is to implement placing things in a
> relocatable area, but on an address which is divisible by some
> particular size, especially if the assembler does not support an .align
> to that size. For example, suppose some piece of the code must reside at
> an address divisible by 16, and no .align 16 directive exists.

This is hard to solve, since the assembler does not know how much space is
actually inserted by such an .org command. We had this problem some time ago,
when we talked about short branch optimization in the assembler: The assembler
has to emit completely relocatable code (that is no constant values at all)
and all address resolving has to be done by the linker. This would add
complexity and delay several warnings/errors until linking occurs. 

And ca65 does allow .align in powers of two up to 2^16.

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 : 2001-12-14 22:05:44 CET