This is just a curiosity question. I was doing some commenting. And I
needed a succinct way to specify some registers. Originally I was saying
something like:

* 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. But it did explain my
intent. There is not a way to directly the low word of one register into
the high word of another register. Interestingly, to restore is the same
instruction with the registers reversed:

  RLLG R13,R0,32


Oh, I cannot use the RISBG because it doesn't exist on my z9BC hardware. I
think the instruction that I "really want" might look like:

  RISBG R0,R13,0,31,32

If I read this correctly, it rotates R13 bits left 32 bits (basically
exchanging the high and low words of R13), then only copies bits 0 through
31 of the rotated result into R0. I.e.

R0[0..31]<-R13[32..64]

The opposite, to restore the bits, would be:

  RISBG R13,R0,32,63,32 R13[32..63]<-R0[0..31]

Oh, and let us not debate whether the [] character should be in IBM-1047
(my selection) or CP-037. They are definitely different hex values.

--
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown

Reply via email to