Re: [cc65] Problems with ORG directive and linker

From: Marc 'BlackJack' Rintsch <marc1rintsch.de>
Date: 2011-03-30 18:54:20
Hi Sidney,

> However, I am still curious; although it is not the recommended
> method in the presence of a capable linker, is there any way to do
> absolute code placement at the assembler level?

I don't think so.

> I would be very happy if I could get the old code-base to work without
> anything other than a few text replacements.

You may write a script that searches and replaces the ``.org``\s and 
creates a linker config.  Example replacements::

  .org $1000 -> .segment "seg_1000"
  .org $c000 -> .segment "seg_c000"

And a linker config::

  MEMORY {
      SEG_1000: start = $1000, size = $b000, fill = yes;
      SEG_c000: start = $c000, size = $4000, fill = yes;
  }
  SEGMENTS {
      seg_1000: load = SEG_1000;
      seg_c000: load = SEG_c000;
  }

Ciao,
	Marc 'BlackJack' Rintsch
-- 
“Dawn, n.: The time when men of reason go to bed.”
                        -- Ambrose Bierce, “The Devil's Dictionary”

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Mar 30 19:09:53 2011

This archive was generated by hypermail 2.1.8 : 2011-03-30 19:09:55 CEST