John Bodoh observed:

> I guess what irks me is that the macro has no way of knowing what to
generate.  There is a hole in the assemble architecture.  For example,
before baseless, when I reference a symbol, the assembler knows how to
resolve the storage location.  It would lookup the symbol, determine the
base register for the storage and the displacement, and generate the
machine code.

If you're willing to do a little extra work, you might be able to assign a
Program Attribute to the symbols your macros must reference (either with
the DC or EQU instructions) that indicates where the symbol is defined,
what program-relevant properties it has, and therefore what kind(s) of
instruction(s) might be needed to address it.

Program Attributes are a very powerful tool for enhancing the power and
flexibility of macro-generated code; an example is given in Case Study 9 of
my presentation at SHARE 115 in Boston titled "Assembler Language as a
Higher Level Langage: Conditional Assembly and Macro Techniques".

John Ehrman

Reply via email to