Phil, You may want to use LLGTR instead of LR, as LR will leave the high half of R15 as it was, while LLGTR R15,R3 will zero the high 31 bits of R15 then copy the low 31 bits from R3 into R15. ============================================== Wayne Driscoll OMEGAMON DB2 L3 Support/Development wdrisco(at)us(dot)ibm(dot)com All opinions are mine, and do not represent IBM Corporation. ==============================================
IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on 06/23/2016 09:47:05 PM: > From: Phil Smith III <li...@akphs.com> > To: IBM-MAIN@LISTSERV.UA.EDU > Date: 06/23/2016 09:47 PM > Subject: Re: [IBM-MAIN] Simple assembler question > Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> > > Chuck wrote: > > >I would consider something like this: > > > LR R15,R3 Copy low 32-bits to R15 > > > SRLG R0,R3,32 Copy upper 32-bits to R0 > > >You may want to add an SR or XR for register 0 and 15 prior to the above > two instructions if you want to make sure of the upper 32-bits of the target > registers. > > > > Thanks! I didn't know SRLG-that's some fancy instruction-and I'm embarrassed > to admit that the simple LR hadn't occurred to me. Hey, I've only been > writing assembler since 1980.I was thinking there would be some new "copy > the bottom half of a register" instruction-but of course that's what > old-school LR does. Doh. > > > > .phsiii (not too embarrassed to admit when he's been dumb) > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN