WITHOUT THE COMMENTS (SORRY, TOO LAZY TO TYPE) THIS IS FROM THE 
BOOK; SUBRTN CONVERTS CONTENTS OF R1, RESULT PLACED AT ADDRESS 
WHERE R2 POINTS, NO REGISTERS ARE ALTERED, RETURN IS VIA R10.
*********************************************************

HEXDUMP  ST    R1,FWORD
         UNPK  DUMMY(9),FWORD(5)
         TR    DUMMY(8),TRANTAB
         MVC   0(8,R2),DUMMY
         BR    R10
*
*
FWORD    DS    F,CL1               1 WORD + 1 BYTE GARBAGE
DUMMY    DS    CL9
TRANTAB  DS    CL(X'F0')           NEVER USED
         DC    C'0123456789ABCDEF'

Note that he first 240 bytes of TRANTAB in the example may contain any 
values whatever due to the fact that every character to be translated will 
have F as a zone digit.  Because of this fact, the following TR instruction and 
definition of TRANTAB are equivalent to those in the example:

         TR    DUMMY(8),TRANTAB-C'0'
TRANTAB  DC    C'0123456789ABCDEF'

...note that the address TRANTAB-C'0' must occur within the same CSECT as 
TRANTAB, or an error will not be detected by the asembler.

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