On 2017-12-08, at 08:28:34, Charles Mills wrote:
> It is illogical that this does not work but that is the way it is.
>
Why is there that inane rule? It's symptomatic of the chaotic (lack of)
design of HLASM.
> Do S-constants work? That is, is S(=x'123') valid, and might that work for
> you?
>
No. I've tried it. It's absurd that:
LA R2,-x'123' succeeds, resolving base and displacement, but:
DC S(=x'123') fails.
An orderly design would call a reusable subroutine for very similar
constructs.
And it doesn't meet the OP's requirement of an adcon in a data structure.
> Do you have to use literals? Can you use named constants instead?
>
You wind up wallowing in names. Generated symbols help only little.
> -----Original Message-----
> From: Windt, W.K.F. van der (Fred)
> Sent: Thursday, December 7, 2017 11:12 PM
>
> DC A(=X'00029983')
>
> ** ASMA030E Invalid literal usage - =X'00029983') I must be
> making some silly mistake and tried to RTFM but can't figure out how to do
> this... Can somebody point me in the right direction?
On 2017-12-08, at 03:51:28, Martin Ward wrote:
>
> Use a macro to generate the table of literals and the pointers,
> and have the macro keep a record of literals which have already
> been generated so that it can re-use the pointer when
> the same literal
That's exactly what literals are supposed to be for. HLASM shouldn't
compel programmers to reinvent that wheel.
-- gil