Troubleshooting
Problem
This instruction gives an error 50% of the time LARL 1,=C'HELLO'
Symptom
ASMA058E Invalid relative address.
Cause
The literal table does not guarantee half word alignment for each literal within it. The LARL requires the alignment.
Resolving The Problem
The LTORG instruction aligns the literal table on a double word boundary. Therefore, you can use it as in this example. The second LTORG will cause the Hello to appear on a double word boundary. Assemble this yourself and look at the addresses.
Code CSect ,
Using *,15
LA 1,=X'34567'
LA 2,=X'123'
Literals LOCTR
LTORG
Code LOCTR
LARL 1,=C'Hello'
Literals LOCTR
LTORG
End
Historical Number
PMR94055_422_000
Was this topic helpful?
Document Information
Modified date:
02 August 2018
UID
swg21393448