Re: [cc65] [ca65] Relative addressing across segments

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2012-08-17 21:14:47
Hello Uz,

* On Fri, Aug 17, 2012 at 08:50:50AM +0200 Ullrich von Bassewitz wrote:
> 
> Hi!
> 
> On Thu, Aug 16, 2012 at 10:19:25PM +0200, Spiro Trikaliotis wrote:
> > I just found out that a relative branch across segments does not work.
> [...]
> > The assembler complains about the branch target out of range, although
> > this is not necessarily true. This depends upon the linker config.
> 
> It's an assumption built into the assembler. No big issue to change.

Thanks for the hint. I think I found it, see my patch send in the other
mail.

I am not sure if there aren't other places where this feature is used,
though, so I am not completely sure if my patch is right.

Also note that I found that ld65 does not handle it correctly. It will
not complain if there are up to 255 byte between branch and target,
which is clearly wrong. It will only complain if the target is more than
255 byte away. I have not found where to fix this on ld65 yet.

Please consider this patch for inclusion. I will try to find the
corresponding place for ld65, if you tell me that the approach is the
right one.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Aug 17 21:15:43 2012

This archive was generated by hypermail 2.1.8 : 2012-08-17 21:15:48 CEST