fun on a slow wednesday
variation on theme at bottom saves 2 instructs/8 bytes :>)
> BINPRINT CSECT ,
> YREGS
> LB R0,BYTE
la r14,2
la r15,word2
l0 ds 0h
> LA R2,4
> L1 SRDL R0,1
SRL R1,7 **NOT** R0
> BCT R2,L1
o R1,0(r15)
st R1,0(r15)
shi r15,L'word1
jct l0,r14
> WORD DS 0D
> WORD1 DC C'0000'
> WORD2 DC C'0000'
> END BINPRINT
IBM Mainframe Discussion List <[email protected]> wrote on 12/12/2007
03:40:25 PM:
> > -----Original Message-----
> > From: IBM Mainframe Discussion List On Behalf Of Arthur T.
> > 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". ...
> Here's another:
> BINPRINT CSECT ,
> YREGS
> LB R0,BYTE
> LA R2,4
> L1 SRDL R0,1
> SRL R0,7
> BCT R2,L1
> O R1,WORD2
> ST R1,WORD2
> LA R2,4
> L2 SRDL R0,1
> SRL R0,7
> BCT R2,L2
> O R1,WORD1
> ST R1,WORD1
> WORD DS 0D
> WORD1 DC C'0000'
> WORD2 DC C'0000'
> END BINPRINT
> -jc-
-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. The information may also constitute a legally
privileged confidential communication. If the reader of this
message is not the intended recipient or an agent responsible for
delivering it to the intended recipient, you are hereby notified
that you have received this communication in error and that any
review, dissemination, copying, or unauthorized use of this
information, or the taking of any action in reliance on the
contents of this information is strictly prohibited. If you have
received this communication in error, please notify us immediately
by e-mail, and delete the original message. Thank you
----------------------------------------------------------------------
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