Dave,

you might consider to use SPM to set the CC in the PSW from the two bits.
Then you can use a series of BC instructions to select the desired
subsequent action...

Does that make sense without a coded example ?
If not, I'll cobble something together for you ...

Abe
===




Op 31/01/2022 om 20:31 schreef Dave Clark:
>         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

Reply via email to