Really no better than what I suggested below, but for some reason I find the
following approach amusing.
The OP's original plan was to include
LABEL DC A(=x'123')
in his table and then, presumably
L Rn,LABEL
in his executable code. Almost exactly the same effect could be achieved by
including
LABEL LA Rn,=X'123'
in the table and
EX 0,LABEL
in the executable code. One notable difference is that the latter requires a
base register for addressing the literals but the OP's original approach
(had it been valid), or mine below, does not. The need for a base register
could be eliminated, at a cost of two bytes per instance in the table, by
using LARL instead of LA in the table.
Charles
-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Charles Mills
Sent: Friday, December 8, 2017 7:47 AM
To: [email protected]
Subject: Re: Address of a =LITERAL
A really unfortunate limitation. Makes no logical sense to me why the
assembler has this limitation.
The only problem I could see would be what about nested literals? Would
users expect to be able to coe
L 1,=A(=X'123))
If S-constants will work for you, then you can fake them with
pseudo-executable instructions. Instead of
DC A(=X'123')
Generate
L 0,=X'123'
If you have a USING for R0 on your literal pool, then the above will
generate a 4-byte instruction. Ignore the first two bytes, and the second
two bytes are your S-Con.