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
--
I cannot receive mail at the address this was sent from.
To reply directly, send to ar23hur "at" intergate "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