On Wed, 26 Jun 2013 08:49:36 -0500, John McKown <[email protected]> wrote:
>* COPY BITS 32 THROUGH 63 OF GENERAL REGISTER 13 INTO >* BITS 0 THROUGH 31 OF GENERAL REGISTER 0. THIS SAVES >* THE AMODE(31) SAVE AREA ADDRESS FOR LATER. > >But I don't really like it. May as write COBOL code <grin/>. So I was >thinking that I could use a type of subscript notation. E.g. > >* COPY R13[32..63] INTO R0[0..31], >* SAVING THE AMODE(31) SAVE AREA ADDRESS FOR LATER. > >Does that "look good" to others? I.e. would a regular HLASM programmer >intuitively understand it? > >Oh, the above was the comment in front of: > > RLLG R0,R13,32 > >Granted the comment was not 100% technically correct. Either I misunderstand how that instruction works, or I would say that comment is in fact quite misleading. As I read the comment, you're saying that you affected only bits 0..31 of R0, and left bits 32..63 alone. But in fact you replaced all of R0 if I understand the way the RLLG instruction works. You ended up with with a complete copy of R13 in R0, but with the upper- and lower-half interchanged. And at that point, why not just use LR R0,R13 instead, with the equally simple way of restoring the original value being LR R13,R0? -- Walt
