Article View: comp.lang.asm370
Article #963hex to decimal
From: Bruce Crabill
Date: Fri, 09 Feb 1990 22:05
Date: Fri, 09 Feb 1990 22:05
18 lines
1131 bytes
1131 bytes
If by hex you mean a binary value, then the following will work (and without
shifts too):
The following code will convert a binary value into a string of EBCDIC
numbers. The binary value is assumed to be positive. In any case, the
sign will be ignored. The value to convert is loaded into R1. The
result is left in the area labeled DECOUT. DECTMP is a scratch area
and must be 8 bytes long. DECOUT can be up to 10 bytes long.
L R1,<Value>
CVD R1,DECTMP
UNPK DECOUT,DECTMP
OI DECOUT+L'DECOUT-1,X'F0'
DECTMP DS D
DECOUT DS CL8
Bruce
Technical Details
Message-ID:
<9002100138.AA24120@lilac.berkeley.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!UMDD.BITNET!BRUCEShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!UMDD.BITNET!BRUCE From: BRUCE@UMDD.BITNET (Bruce Crabill) Newsgroups: comp.lang.asm370 Subject: hex to decimal Message-ID: <9002100138.AA24120@lilac.berkeley.edu> Date: 9 Feb 90 22:05:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List <ASM370%UCF1VM.bitnet@lilac.berkeley.edu> Distribution: inet Organization: The Internet Lines: 18