On Mon, Jun 20, 2016 at 10:33 AM, Paul Gilmartin <
[email protected]> wrote:

> On 2016-06-20, at 09:05, John McKown wrote:
>
> > On Mon, Jun 20, 2016 at 9:59 AM, John McKown wrote:
> >
> >>> Why shouldn't this be allowed:
> >>>
> >>> 00000182 0000 0000 0000          00000000    294          LLILF
> >>> R15,V(BPX4GUI)          GET THE EPA
> >>> ASMA044E Undefined symbol - V
> >>> ASMA173S Delimiter error, expected blank - (BPX4GUI)
> >
> > ​OOPS, I was thinking of the wrong instruction. V(BPX4GUI) is not a self
> > defining symbol. So HLASM won't use it as an immediate value. I guess
> it's
> > a design decision. You could do something like:
> >
> >   LLILF R15,0
> >   ORG *-4
> >   DC    VL4(BPX4GUI) VL4 AVOIDS FULLWORD ALIGNMENT
> > *  ORG , NOT REALLY NEEDED.
> >
> Ugh!  Perhaps a design indecision, or just inconsistency.
> Long ago, I posted here:
>
>                  R:B  0101A          13          USING *,R11
> 00101A 4110 B006            01020    14          LA    R1,=E'3.14159'
> 00101E                               15          DC    S(=E'3.14159')
> ** ASMA030E Invalid literal usage - =E'3.14159')
>
> I think the developers had to go out of their way to make a reference
> to a relocatable address expression resolve to a base and displacement
> successfully in an instruction, but fail in an S-constant.  Use of a
> common subroutine for base-displacement resolution would go a long
> way toward providing consistency.
>
> I suppose some address expressions are more equal than others, but
> this sort of complexity is a blot on the future of assembly-language
> programming.
>
> -- gil
>

​Well, one "problem" is the HLASM is an _old_ language. Basically, many
things like this could be "cleaned up" if IBM felt it was cost effective to
reimplement HLASM ​from scratch. It has a lot of "cruft" left in it for
compatibility with old code. Other assemblers, such as MicroFocus, Tachyon,
and DASM are likewise hobbled by compatibility with HLASM.

If I really understood GOFF, XOBJ, and the OBJ output formats, it might be,
uh, "interesting" to create new z/OS assembler. But, really, with IBM's
latest C compiler being able to embed assembler into the C code, like GNU
C, it likely wouldn't be very useful. If I had the option, I would love to
use C instead of HLASM. But that would require C header files and macros
for system structures (DSECT) and facilities.


-- 
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."

>From "Star Nomad" by Lindsay Buroker:

Maranatha! <><
John McKown

Reply via email to