Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!UUNET.UU.NET!ncrlnk!rd1632!conwell From: ncrlnk!rd1632!conwell@UUNET.UU.NET (Ted Conwell) Newsgroups: comp.lang.asm370 Subject: Register Display Message-ID: <9004111010.AA17486@ucbvax.Berkeley.EDU> Date: 10 Apr 90 15:54:11 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List Distribution: inet Organization: The Internet Lines: 28 In article IBM 370 Assembly Programming Discussion List writes: >I am looking for an assembler macro that will convert the contents of a >register to printable characters. IBM is bound to have one floating >around. Can anybody lead me in the right direction? There is no macro that I know of to perform this function. When I wanted to perform this, I wrote a routine to do it. You need to store the register, perform the next step byte by byte. Move the low-order byte to the low-order byte of an 8-byte work area. Do a MVO of the same byte to the next byte in the work area. Continue with each byte. Do an NC with a mask of 'OFOFOFOFOFOFOFOF' and that will turn off the high-order bits of the bytes. Do a TR on the work field to convert the bytes to display characters with a table of C'0123456789ABCDEF'. This will convert the contents of the register to display in a work area. I don't have the time to code this up now, so I am just providing a description. If there is any interest, I could take the time to write the routine, but I assume that you know IBM Assembler. ------------------------------------------------------------------------------ Ted Conwell | Ted.Conwell@Dayton (NCR Internal) NCR Corporation | Ted.Conwell@rd1632.Dayton.NCR.Com (CSNET) Software Technology, R&D, WHQ-5E | 1700 S. Patterson Blvd. | Dayton, OH 45479 | | (513)445-1298 | ------------------------------------------------------------------------------