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).



It would seem to me that when a relative instruction references a literal,
the assembler should force an otherwise unaligned literal to be aligned in
order to meet the requirements of the relative instruction.



Has anyone else run into this problem?



Is there any known method by which to force an otherwise unaligned literal
to be aligned.


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



2. You can specify your literal as a halfword or fullword literal, e.g.:

     LARL  3,=h'23'



3. Best bet: avoid literals. I never code them. Bet you can
   always find a way around coding a literal; e.g., in the
   example above:

     LARL  3,h23

     .
     .
     .

H23  dc    h'23'


   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'






John P. Baker



--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

* To get a good Return on your Investment, first make an investment!
  + Training your people is an excellent investment

Reply via email to