I didnt know that specifying an index reg would suppress alignment
warnings, but it makes sense. I might exploit that.

Currently, my policy is to just ignore the messages if I cant control the
alignment.  They dont disturb me at all.  Most code I work with written by
others uses ICM, which I think is too ugly just to avoid an info-level
message.  Theres little point in arguing performance, but I highly doubt
ICM is any faster than an unaligned L.  The ACONTROL sequence is imho,
ridiculous, as it adds more clutter to the listing than the message does.
Not to mention more typing.

Is there such a thing as an implicit index register? ;-)

sas

On Tue, Sep 2, 2025 at 7:11 AM Jonathan Scott <
00001b5498fc732f-dmarc-requ...@listserv.uga.edu> wrote:

> This technique relies on the rule that including an explicit index
> register in an address expression suppresses the alignment warning, even if
> that index register is zero (which may originally have been an oversight).
> HLASM's own source code uses this technique, so it should be safe to use.
> I thought I had submitted a documentation update request a few years ago to
> ensure this was properly documented, probably as part of the explanation of
> message ASMA033I (which already shows how to use an explicit base
> register), but I can't find any mention in the current documentation, and
> having retired from IBM I no longer have access to the request queue so I
> can't tell whether it is still in the queue.
>
> Jonathan Scott
>
> -----Original Message-----
> From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> On
> Behalf Of Peter Morrison
> Sent: 02 September 2025 11:10
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: Using (0) to suppress alignment checks in HLASM
> Importance: High
>
> Hello,
>
>                 Has anyone else used (0) at the end of an RX (or RXY)
> instruction to suppress the assembler's alignment check?
>
>                 For Example:
>
>                                 DC X'00'        force next field to be
> unaligned
>                 X_UNAL  DC AL4(0)       Declare an unaligned fullword
>
>                                 L       R0,X_UNAL
>  gets a warning
>                                 L       R0,X_UNAL(0)
> same generated code (ix reg is 0) but no warning
>
>                 If so, where is it documented? (this is easier than a
> <PUSH ACONTROL/ACONTROL NOALIGN/instr/POP ACONTROL> sequence (and takes no
> extra lines))
>
> Peter Morrison
>

Reply via email to