I've been testing all... Might as well come out of the dark... You pass !
-----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Art Celestini Sent: Wednesday, December 12, 2007 8:52 PM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: Mainframe Assembler Coding Contest Well, just for the sport of it, I think this requires even less (not tested): LHI R1,8 IC R2,BYTE STC STC R2,RESULT-1(R1) SRL R2,1 BCT R1,STC NC RESULT,=8X'01' OC RESULT,=8X'F0' * BYTE DC B'01110101' Sample input RESULT DS CL8 Output 32 Instructions 16 Literals 1 Input Area 8 Output Area 57 Total Bytes 7 Total Instructions BTW, John, your second instruction below refers to WORK8, which doesn't seem to be defined. -- Art At 04:30 PM 12/12/2007, 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 ================================================== Art Celestini Celestini Development Services Phone: 201-670-1674 Wyckoff, NJ ============= http://celestini.com ============= Mail sent to the "From" address used in this post will be rejected by our server. Please send off- list email to: ibmmain<at-sign>celestini<dot>com. ================================================== ---------------------------------------------------------------------- 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 ---------------------------------------------------------------------- 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