public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [z80] Defer result of address based expressions until link?
@ 2011-07-05  8:56 Chris Smith
  0 siblings, 0 replies; only message in thread
From: Chris Smith @ 2011-07-05  8:56 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-05  8:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-05  8:56 [z80] Defer result of address based expressions until link? Chris Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).