[cc65] Banking improvements

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-01-05 10:34:57
Good morning!

I've introduced two improvements for banking lately.

The first one was suggested by David Lloyd. There's now a new symbol for
memory areas called __NAME_FILEOFFS__, which contains the offset of the memory
section in the output file. It is defined when using "define = yes" for the
memory area, and only if the memory area is output to a binary file.

The second was suggested by Groepaz here:

  http://www.cc65.org/mailarchive/2009-11/7529.html

Thread start:

  http://www.cc65.org/mailarchive/2009-11/7511.html

The memory area attribute is named "bank" (not "banked" as in groepaz
suggestion), and consequently, the assembler pseudo function is .BANK. The
argument may be any expression that has exactly one segment reference. So

        foo:
                .word   .bank (foo)

will work, while things like

        foo:
        bar:
                .word   .bank (foo - bar)

will not. See also the comments in the assembler docs:

  http://www.cc65.org/snapshot-doc/ca65-10.html#ss10.1

As usual, I'm glad about any feedback.

Regards


        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 Thu Jan 5 10:35:05 2012

This archive was generated by hypermail 2.1.8 : 2012-01-05 10:35:10 CET