Tom,

I liked your solution. Truly ingenious!
It might get just a bit shorter by using ICM instead of the IC+SLL:   

         ICM   R5,B'1000',INBYTE

-Victor-  
====================================================
Date:    Thu, 13 Dec 2007 17:13:09 -0800
From:    Tom Simons <[EMAIL PROTECTED]>
Subject: Re: Mainframe Assembler Coding Contest

Here's 8 instructions to translate 8 bits to 8 chars of 1's or 0's:

         LA    R3,8
         IC    R5,INBYTE
         SLL   R5,24
LOOP     SLL   R4,3
         SLDL  R4,1
         BCT   R3,LOOP
         ST    R4,OUTCHAR
         UNPK  OUTCHAR(9),OUTCHAR(5)

OUTCHAR  DS    CL8
         DS    X
INBYTE   DC    B'10101011'

This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.

----------------------------------------------------------------------
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