I should have added "after WORK8 is changed to OBUFF", a correction which 
was mentioned in earlier posts.

Bill

On Wed, 12 Dec 2007 23:42:12 -0600, Bill Godfrey wrote:

>John's code is correct. There won't be a value X'10' in OBUFF. Only hex 
values
>00, 01, 02, 04, and 08.
>
>Even this would work:
>      TR   OBUFF,=C'011-1---1'
>
>Bill
>
>On Wed, 12 Dec 2007 22:38:30 -0600, Rick Fochtman wrote:
>
>>Look again at your translate table. What will value X'10" translate to???
>>
>>Nice try...
>>Rick
>>--------------------------------------------------------
>>John P Baker wrote:
>>
>>>I have not tested it, but the following code should be the most compact
>form of generating a binary character string from a byte value (Problem #6):
>>>
>>>         MVC   OBUFF,IBYTE
>>>         MVC   OBUFF+1(7),WORK8
>>>         NC    OBUFF,=X'8040201008040201'
>>>         MVO   WORK5,OBUFF(4)
>>>         MVC   OBUFF(4),WORK5
>>>         TR    OBUFF,=C'011111111'
>>>
>>>IBYTE    DC    B'01110101'         Sample input value
>>>WORK5    DC    X'0000000000'
>>>OBUFF    DS    CL8                 Output value
>>>
>>>Summary of storage requirements:
>>>
>>>  36  Instructions
>>>  17  Literals
>>>   1  Input Buffer
>>>   5  Work Area
>>>   8  Output Area
>>>
>>>  67  Total Bytes
>>>   6  Total Instructions
>>>
>>>John P Baker
>>>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to