This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[z80] Defer result of address based expressions until link?


With legacy Z80 assemblers, it is quite reasonable to write:

LD   HL, Label2 - Label1   ; Find Length
LD   A,   Label1 / 256       ; Get High Byte of address

however you cannot do this with binutils-z80. The work around is to fix such 
addresses, using equ to aid readability and make maintainance easier, however 
it is not ideal, and prevents the use of such operations in any library code, 
which is a real problem - and a source of much frustration.

Like the AVR target, what would be the effort in making the result of such 
address-based expressions relocatable or deferred until link time?

There are a number of developers who would like to move to binutils, but are 
unwilling at the moment due to the porting effort their existing code would 
require (which in some cases would be impossible).

I've breifly looked at the patch Björn Haase submitted for AVR in this respect, 
and wondered if Arnold had a view on the effort?

Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]