Gregory I don't know if you noticed but Don Poitras managed to contribute a post to a thread in ASSEMBLER-LIST here in IBM-MAIN.
You may be sure your solution was offered many times in many guises in the ASSEMBLER-LIST thread. Incidentally, I express that reservation about addressability in the simple terms of "There must be 240 bytes of code between the beginning of the CSECT - typically the beginning of the source code - and the appearance of the DC C'0123456789ABCDEF' statement." Is the way you express the reservation more accurate in some way which is hidden by my more straightforward sentence? Indeed it can be irritating when a routine which requires translation of hexadecimal characters is just too small to "use up" sufficient - that is, 240 bytes of - storage before this final "DC". Obviously, if your tried to make your subroutine a separately assembled CSECT for linkage editing where needed, you'd be in trouble! Chris Mason P.S. It was the need to explain the sign half-bytes fully that took my attention in Don's post, caused me to subscribe to ASSEMBLER-LIST and provide my observation on the topic there where it belongs - although I'm amazed that the OP didn't find the answer to his question in the archives. Perhaps it's good to air these old chestnuts from time to time! On Tue, 3 Feb 2009 01:14:31 -0600, Gregory Pinkowski <[email protected]> wrote: >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

