> On 2020-07-02, at 17:44:38, Dan Greiner wrote:
>
> The following simple program illustrates address constants of various sizes:
>
> RLDNFG CSECT
> A DC AL1(H)
> B DC AL2(G)
> C DC AL3(F)
> D DC AL4(E)
> E DC AL5(D)
> F DC AL6(C)
> G DC AL7(B)
> H DC AL8(A)
> END
>
> Assembling this code using z390, relocation-dictionary (RLD) entries are
> generated only for the 2-, 3-, 4-, and 8-byte address constants. RLD entries
> are not generated for the 1-, 5-, 6-, and 7-byte address constants.
>
> Furthermore, in the generated listing (.PRN) file, the RLD entry for the
> 8-byte address constant correctly indicates that it's an 8-byte address.
> However in the generated object (.OBJ) file, the RLD record for 8-byte entry
> contains a flag field of x'00'. According to "HLASM for z/OS, z/VM, & z/VSE:
> Programmer's Guide, V1, R6" (SC26-4941-06), an RLD-entry flag byte of zero
> indicates a 1-byte address constant; the flag byte for an 8-byte address
> constant should be X'4C'.
>
> Being a z390 newbie, I wasn't quite certain what to expect ... but I was
> rather gobsmacked to get this result. Is this a bug or a feature?
>
Yes. From:
https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.asma400/adconay.htm
• Home
• z/OS 2.2.0
Address constants—A and Y
Notes:
1• No bit-length modifier (see 1 in Table 1) is allowed when a
relocatable or complex relocatable expression (see 2 in Table 1) is
specified. The only explicit lengths that can be specified with relocatable or
complex relocatable address constants are:
• 2-8 bytes for AD-type constants
• 2, 3, or 4 bytes for A-type constants
• 2 bytes for Y-type constants
I might expect an error message for unsupported lengths.
What happens if the address relocated at execution time is
outside the length supported by the ADCON length?
o An error is reported?
o The address is treated modulo ADCON size?
Either is unpleasantly unpredictable.
-- gil