Use LGH instead of LH (or maybe even LGHI). If you are not in AMODE 64, you probably don't care about messing with the high order half of the register. In this case, the low order bits of the register will contain the same value they would have contained with LH.
-----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Bernd Oppolzer Sent: Saturday, October 23, 2021 3:58 PM To: [email protected] Subject: Re: Question about negative indexes So this means that LA 2,ITEM+10 LH 3,=H'-5' LA 2,0(2,3) will put the address ITEM+5 in register 2, at least in AMODE 24/31? With AMODE 64, this will be a problem, because the LH instruction only fills the right half of the 64 bit register 3, right? Is there a way to do this right in all AMODEs? For positive indexes? (only, if we assume the left half to be zero?) Thanks, kind regards Bernd ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
