On Wed, 12 Dec 2007 14:18:51 -0500 "Arthur T." <[EMAIL PROTECTED]> wrote:
:>On 12 Dec 2007 04:50:17 -0800, in bit.listserv.ibm-main :>(Message-ID:<[EMAIL PROTECTED]>) :>[EMAIL PROTECTED] (Don Higgins) wrote: :>>There is a new Mainframe Assembler Coding Contest underway :>>here: :>>http://z390.sourceforge.net/z390_Mainframe_Assemble_Coding_Contest.htm :> <snip> :>>Check out problem #6 submitted by John Erhman for which no :>>solutions have been posted yet. :> I don't have a working assembler or emulator at the :>moment, so I can't test this. Also, I'm not joining a :>Yahoo group just for this contest. But I think this is a :>solution to #6: "Given a byte, create 8 EBCDIC zero and :>one characters displaying the individual bits in the :>byte". I'd appreciate if someone would test it for :>me. (Of course, if run on an ASCII machine, it'll likely :>give ASCII zeros and ones.) :>BINPRT SUBENTRY :> MVC BIT1,BYTE PRIME OUTPUT AREA :> MVC BIT2(7),BIT1 DITTO :> TR BIT1,EIGHTS :> TR BIT2,FOURS :> TR BIT3,TWOS :> TR BIT4,ONES :> TR BIT5,EIGHTS :> TR BIT6,FOURS :> TR BIT7,TWOS :> TR BIT8,ONES :> SUBEXIT :>* :>BYTE DC B'01111001' INPUT VALUE :>* :>EIGHTS DC 16C'0000000011111111' :>FOURS DC 32C'00001111' :>TWOS DC 32C'00110011' :>ONES DC 32C'01010101' :>* :>PRTBYTE DS 0CL8 :>BIT1 DS C :>BIT2 DS C :>BIT3 DS C :>BIT4 DS C :>BIT5 DS C :>BIT6 DS C :>BIT7 DS C :>BIT8 DS C :> END Constraints are not well defined. If one can use an 8*256 byte table .... 3 silicon instructions (4, if LB is in silicon) - not tested ...entry logic LB R1,BYTE SLL R1,3 LA R2,TABLE+8*128(R1) MVC RESULT,0(R2) ...exit logic TABLE DC C'10000000' DC C'10000001' ... DC C'11111111' DC C'00000000' DC C'00000001' ... DC C'01111111' -- Binyamin Dissen <[EMAIL PROTECTED]> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. ---------------------------------------------------------------------- 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

