An interesting idea, but there are a couple of potential problems:

(1) Addresses and offsets aren't known until the end of the first pass over
the source, when the values of all symbols are known. This means it's
difficult to capture the needed information in time for use by conditional
assembly.

(2) Suppose you find that an address can use a short displacement.
Subsequent instructions need long displacements, which makes the
displacement assigned to the first instruction too small. This could lead
to a situation where the displacements oscillate back and forth for each
pass.  (Similar problems occur with text formatters, where shorter or
longer page numbers, or movement of figures from places where they fit, can
change with each pass over the text.)

But we do appreciate your interest and ideas!  Keep them coming!

Reply via email to