On Aug 21, 2010, at 14:59, Steve Comstock wrote:
> John P. Baker wrote:
>> When using the LARL instruction to reference a literal (i.e., =X'..'), I
>> receive an ASMA058E error message due to the literal not being property
>> aligned (on a halfword boundary).
>
> 1. LARL stores the address of the target as a signed fullword
> binary integer designating how many halfwords away the target
> is from the instruction; because of this, LARL can never
> generate an odd address
>
Which is exactly the reason John B. received the ASMA058E
error message.
> 2. You can specify your literal as a halfword or fullword literal, e.g.:
>
> LARL 3,=h'23'
>
Depriving the programmer of the convenience of the hex
representation.
> 3. Best bet: avoid literals. I never code them.
>
The original designers of the assembler, in their wisdom,
provided literals. Would you impose your personal coding
esthetic on all programmers?
> since you know LARL always requires an even addres, you could
> always do something like this:
>
> LARL 4,mylit
> ...
> ds 0h
> mylit dc c'An odd number of characters'
>
This suggests an alternative to John B's requirement, perhaps
more generally useful: multiple constants within a literal.
Suppose one could code:
LARL 4,=(0H'0',X'1234')
Thinking a little further about what the assembler might need
to do to materialize a literal such as:
=(C'a',0D'0',C'b')
I suspect it may not be worth it.
-- gil