Re: [cc65] Some unrelated patches to ca65, documentation and the build system for dicussion

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-08-18 22:43:36
On Fri, Aug 17, 2012 at 10:30:57PM +0200, Ullrich von Bassewitz wrote:
> On Fri, Aug 17, 2012 at 09:11:38PM +0200, Spiro Trikaliotis wrote:
> > Patch 1 allows to do inter-segment branches in ca65, as alreads discussed in
> > the other mail. Note, however, that ld65 will not discover every possible
> > problem, as the range will be more like -255..255 instead of -128..127.
> > I am not sure how to fix this in ld65, though.
>
> Having a quick look at the patch I think there's more than that to fix it. I
> will make the necessary changes.

That brings up the general question: Should the assembler emit an error for
any addressing that is an error in almost situation, but might also be ok in
some special cases?

One such situation is a short branch between segments. This won't work in most
cases, but there are of course some situations where it will be ok.

Another example is stuff like this:

.code
foo:
.data
        .byte   foo

In almost any case, the CODE segment is not in the zero page, so this won't
work, but you're of course free to place CODE into the zeropage, which makes
above instruction work.

Currently, the assembler will catch these situations, which is probably what
most people want, but it won't allow some tricky stuff. Delaying the error
messages til the link stage will allow it, but might be inconvenient.

Or maybe this behaviour should be switchable by an assembler option?

Not sure how to proceed


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Aug 18 22:43:45 2012

This archive was generated by hypermail 2.1.8 : 2012-08-18 22:43:49 CEST