Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!ucbvax!BOGECNVE.BITNET!XMAS From: XMAS@BOGECNVE.BITNET Newsgroups: comp.lang.asm370 Subject: Re: Writing double word binary numbers on screen Message-ID: <9009252307.AA23460@ucbvax.Berkeley.EDU> Date: 25 Sep 90 19:46:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List Distribution: inet Organization: The Internet Lines: 28 >Hi 370 Assemblers.. Who, me? ;-> >I have a double word binary number, and I want to write it on screen in >decimal form. How can I write it ? Any help would be appreciated. > -Suleyman Kutlu >System Programmer Try the following code fragment: * R3 contains the doubleword binary number * CVD R3,PAKNUM Convert to decimal UNPK DECNUM,PAKNUM Unpack to character OI LASTDIG,X'F0' 'Fix' last digit to positive ... DS 0D PAKNUM DC CL8 Packed decimal DECNUM DS 0CL15 DC CL14 Unpacked decimal LASTDIG DC CL1 Last digit ... I hope this helps. Of course you should check out the above code with your compiler. ;-) ... Mark