Re: [cc65] Problems with ORG directive and linker

From: Sidney Cadot <sidney1jigsaw.nl>
Date: 2011-03-30 19:23:31
Hi Marc,

There are two issues with your suggested approach when applied to my code.

First, many of the .ORG statements take an expression as their argument.

Second, the code contains a lot of .ORGs to the same address, this
technique (hack) is used by the original authors to emit a byte that
indicates whether a piece of code collides with the code that is
supposed to come after it.

The frustrating thing is that ca65 accepts this without a problem, and
emits a perfectly good "listing" file where all addresses and values
are fine, but due to the unusual ORG semantics, the emitted object
file is different. It is a bit weird to realize that the addresses as
emitted in listing files are not to be interpreted as the actual
addresses where stuff will end up.

(For those interested, my codebase is the original Atari 400/800 OS
RevB, which I scanned, OCR'ed, and proof-read).

Cheerio, Sidney
----------------------------------------------------------------------
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:23:38 2011

This archive was generated by hypermail 2.1.8 : 2011-03-30 19:23:41 CEST