This is the mail archive of the
mailing list for the binutils project.
[z80] Defer result of address based expressions until link?
- From: Chris Smith <chris at nfluid dot com>
- To: binutils at sourceware dot org
- Date: Tue, 5 Jul 2011 09:53:15 +0100
- Subject: [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?