Re: [cc65] Problems with ORG directive and linker

From: Groepaz <groepaz1gmx.net>
Date: 2011-03-31 06:31:57
On Donnerstag 31 März 2011, you wrote:
> On 03/30/2011 08:30 PM, Groepaz wrote:
> > On Mittwoch 30 März 2011, you wrote:
> >> 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.
> > 
> > its not unusual actually - every toolchain that includes an external
> > linker works like this :)
> > 
> > maybe something like ACME is a better idea for this particular project -
> > it works like you need it.
> 
> Have you examined the option to replace all these .orgs with labels
> instead?
> 
> I mean instead of having
>    .org $1234
> 
> ...
> 
>    jsr $1234
> 
> You would use
> org1234:
> ...
> 
>    jsr org1234
> 
> And let the linker assemble the stuff as it sees fit. The things may not
> end up in the right locations but the code could work.

as i understood, the code is written in such a way that it relies on 
assembling to the same adress multiple times... like

	* = $1234

   lda #0

	<more stuff here>

	* = $1235

	.byte 5
  
probably quite some work to convert something like that. (but imho worth it, 
this is really a bad way to do things)

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

Hard work has a future payoff. Laziness pays off now.

----------------------------------------------------------------------
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 Mar 31 06:32:12 2011

This archive was generated by hypermail 2.1.8 : 2011-03-31 06:32:15 CEST