Unfortunately this does not work if BAR is an undefined label that is resolved during late binding.
The reference could be saved in the relocation / undefined labels list without problem, but xa creates an error when it encounters this definition of FOO.
Instead: xa should note that FOO is undefined, and refers to BAR with an offset. When FOO is used, BAR+offset should be substituted.
This seems to work like a pre-processor statement, but the difference is that FOO is a proper label with segment, and in the listing FOO should still be printed instead of BAR+offset
I want to replace things like:
with
Unfortunately this does not work if BAR is an undefined label that is resolved during late binding.
The reference could be saved in the relocation / undefined labels list without problem, but xa creates an error when it encounters this definition of FOO.
Instead: xa should note that FOO is undefined, and refers to BAR with an offset. When FOO is used, BAR+offset should be substituted.
This seems to work like a pre-processor statement, but the difference is that FOO is a proper label with segment, and in the listing FOO should still be printed instead of BAR+offset