On Aug 22, 2010, at 06:27, Don Higgins wrote:

> I support John Baker's request to add HLASM option to force odd length
> literals to next even length by adding pad character when referenced by
> relative instructions.  The single extra pad byte can be added at the time
> the literal is added to the literal pool reference table without any other
> special flags required.
>
Plausible.  A test:

High Level Assembler Option Summary       (PTF UK37157)   Page    1
                                       HLASM R6.0  2010/08/22 06.38
                                                          Page    3
  Active Usings: None
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement
000000                00000 00019     1 LITREL   CSECT
000000 0000 0000            00000     2          LH    0,=X'000102'
** ASMA307E No active USING for operand =X'000102'
** ASMA435I Record 2 in SPPG.LITREL.JOB02988.D0000101.? on volume:
000004 0000 0000 0000       00000     3          LARL  0,=X'030405'
** ASMA058E Invalid relative address - =X'030405'
** ASMA435I Record 3 in SPPG.LITREL.JOB02988.D0000101.? on volume:
00000A C000 0000 0006       00016     4          LARL  0,=X'060708'
                                      5          END
000010 000102                         6                =X'000102'
000013 030405                         7                =X'030405'
000016 060708                         8                =X'060708'

While I see scant ROI in adding to the Assembler a feature that
the programmer can do easily (perhaps with John G.'s fantastic
technique), the programmer should be freed of indeterminacy.
Statement (3) properly produces an error while (4) is quietly
accepted.  I'd suggest that (4) should produce a warning:

    ASMA058W Relative address is not predictably even.

to alert programmers, especially macro coders, especially ISVs
that it is only by happenstance that the construct assembles
successfully.  But then it might be as practical to implement
your suggestion and pad all literal operands of -RL instructions
to even length.

-- gil

Reply via email to