I'd probably do

         IC     R1,Flag
         RISBGZ R0,R1,62,63,-6
         RISBGZ R1,R1,62,63,-4
         ALI    R0,C'1'
         ALI    R1,C'1'

rather than using LLC and SRL

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf 
of Dave Clark [dlcl...@winsupplyinc.com]
Sent: Monday, January 31, 2022 2:31 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Making Encoded Bits Human Readable

        I have two pairs of encoded bits in the high order of a binary
byte.  These two pairs (values of 0 to 3, each) actually represent the
numbers 1 to 4 in each case.  Now, I know that I could do this the hard
(long?) way by bit-testing these and come up with the human-readable zoned
equivalents.  In fact, I've already done that.

        But, not only do I not like how the code looks in my program, I
also think there should be a shorter way.  For example, I could insert the
byte into a register, shift out the unwanted bits, and then add 1 to get
the same numbers -- but in binary.  I would then have to
convert-to-decimal and unpack or edit the numbers into zoned format.

        That seems like a bit much.  So, is that what I am going to have
to do?  ...or stick with bit-testing?  ...or is there a better way to
accomplish this?

Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio  45439  USA
(937) 294-5331



*********************************************************************************************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately notify the sender and delete and destroy the message and all
copies. All unauthorized direct or indirect use or disclosure of this
message is strictly prohibited. No right to confidentiality or privilege
is waived or lost by any error in transmission.
*********************************************************************************************

Reply via email to