

                22-Aug-1978 02:32:35	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 1   

					CVTOHX.FTN.2        



        C

        C

        C	CVTOHX  -- CONVERT TO HEXADECIMAL

        C

        C

        C

        C	COPYRIGHT (C) 1976

        C	DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

        C

        C	THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

        C	SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

        C	SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

        C	OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

        C	AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

        C	AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

        C	OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

        C

        C	THE INFORMATION IN THIS SOFTWARE  IS  SUBJECT TO CHANGE WITHOUT

        C	NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

        C	EQUIPMENT CORPORATION.

        C

        C	DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

        C	SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

        C

        C

        C	T.J. PORTER    01-AUG-76

        C

        C

        C

        C	THIS SUBROUTINE CONVERTS A 4 BYTE INTEGER TO

        C	A HEXADECIMAL CHARACTER STRING WITH LEADING ZEROES SUPPRESSED.

        C

        C

0001    	SUBROUTINE CVTOHX(DUMMY,HEXARA)

        C

        C

0002    	BYTE	HEXARA(8),DUMMY(4),ZERO,BLANK

        C

0003    	DATA ZERO,BLANK/48,32/

        C

0004    	DO 500 I = 1,4

        C

0005    		DO 400 K = 0,1

        C

0006    			J = 2*I + K - 1

0007    			MASK = 15*( 16**K )

0008    			ICHAR = DUMMY(I) .AND. MASK

0009    			ICHAR = ICHAR/(16**K)

        C

0010    			IF( ICHAR .GT. 9 ) GO TO 200

0011    			ICHAR = ICHAR + 48

0012    			GO TO 300

        C

0013    200			ICHAR = ICHAR + 55

        C

0014    300			HEXARA(9-J) = ICHAR



CVTOHX          22-Aug-1978 02:32:35	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 2   

					CVTOHX.FTN.2        



        C

0015    400		CONTINUE

        C

0016    500	CONTINUE

        C

0017    	DO 600 J = 1,7

        C

0018    		IF( HEXARA(J) .NE. ZERO ) GO TO 700

0019    		HEXARA(J) = BLANK

        C

0020    600	CONTINUE

        C

0021    700	RETURN

0022    	END



CVTOHX          22-Aug-1978 02:32:35	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 3   

					CVTOHX.FTN.2        



PROGRAM SECTIONS



    Name                 Bytes   Attributes



  0 $CODE                  171   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG

  2 $LOCAL                  52   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG





ENTRY POINTS



    Address  Type Name           



  0-00000000      CVTOHX         





VARIABLES



    Address  Type Name               Address  Type Name               Address  Type Name               Address  Type Name           



  2-00000001  L*1 BLANK            2-00000002  I*2 I                2-0000000A  I*2 ICHAR            2-00000006  I*2 J              

  2-00000004  I*2 K                2-00000008  I*2 MASK             2-00000000  L*1 ZERO           





ARRAYS



    Address  Type Name		       Bytes  Dimensions



 AP-00000004@ L*1 DUMMY                    4  (4)

 AP-00000008@ L*1 HEXARA                   8  (8)





LABELS



    Address   Label       Address   Label       Address   Label       Address   Label       Address   Label       Address   Label   



  0-00000064  200       0-00000067  300           **      400           **      500           **      600       0-000000AA  700     





Total Space Allocated = 223 Bytes





COMPILER OPTIONS



/CHECK=(NOBOUNDS,OVERFLOW)

/DEBUG=(NOSYMBOLS,TRACEBACK)

/OPTIMIZE  /WARNINGS  /NOI4  /NOD_LINES  

