Making Peter's approach even more old school, use R14 and R15
instead of R0 and R1, and do the character conversion stuff
with Load Address instead of Add Halfword Immediate.

         ICM   R14,B'1000',BYTE   Put the byte into bits 0-7
         SRDL  R14,30             Move BYTE.0-1 to reg 14.30-31,
*                                 zeroing reg 14.0-29
*                                 BYTE.2-3 to reg 15.0-1
         SRL   R15,30             Move BYTE.2-3 to reg 15.30-31,
*                                 zeroing reg 15.0-29
         LA    R14,X'F1'(,R14)    0-3 => C'1'-C'4'
         LA    R15,X'F1'(,R15)

         STC   R14,TARGET0
         STC   R15,TARGET1
BYTE     DS    X

Reply via email to