LIB$CVTDF       ; Convert Double to Floating                     21-AUG-1978 18:57:18   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      92  HISTORY		; Detailed Current Edit History

   (3)      99  DECLARATIONS

   (4)     134  LIB$CVTDF - Convert Double to Floating and chec

LIB$CVTDF       ; Convert Double to Floating                     21-AUG-1978 18:57:18   VAX-11 MACRO X0.3-11               Page   1

01-6                                                                                                                             (1)



                                     0000     1 	.TITLE	LIB$CVTDF	; Convert Double to Floating

                                     0000     2 	.IDENT	/01-6/		; File: LIBCVTDF.MAR

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; Copyright (C) 1977

                                     0000     6 ; Digital Equipment Corporation, Maynard, Massachusetts 01754

                                     0000     7 ;

                                     0000     8 ; This software is furnished under a license for use only on a single

                                     0000     9 ; computer  system  and  may be copied only with the inclusion of the

                                     0000    10 ; above copyright notice. This software, or any other copies thereof,

                                     0000    11 ; may not be provided or otherwise made available to any other person

                                     0000    12 ; except for use on such system and to one who agree to these license 

                                     0000    13 ; terms.  Title to  and  ownership of the software shall at all times 

                                     0000    14 ; remain in DEC.

                                     0000    15 ;

                                     0000    16 ; The information in the software is subject to change without notice

                                     0000    17 ; and should  not  be construed  as a commitment by Digital Equipment 

                                     0000    18 ; Corporation.

                                     0000    19 ;

                                     0000    20 ; DEC assumes  no  responsibility  for the use or  reliability of its

                                     0000    21 ; software on equipment which is not supplied by DEC.

                                     0000    22 ;

                                     0000    23 ;

                                     0000    24 ; FACILITY: General Utility library

                                     0000    25 ;++

                                     0000    26 ; ABSTRACT:

                                     0000    27 ;

                                     0000    28 ;	LIB$CVTDF converts a Double precision floating point scalar

                                     0000    29 ;	quantity to Single precision floating point quantity and

                                     0000    30 ;	checks for floating overflow.

                                     0000    31 ;

                                     0000    32 ;--

                                     0000    33 ;

                                     0000    34 ; VERSION: 01

                                     0000    35 ;

                                     0000    36 ; HISTORY:

                                     0000    37 ;

                                     0000    38 ; AUTHOR:

                                     0000    39 ;	Thomas N. Hastings, 27-May-77: Version 01

                                     0000    40 ;

                                     0000    41 ; MODIFIED BY:

                                     0000    42 ;

                                     0000    43 ;

                                     0000    44 ;

LIB$CVTDF       ; Convert Double to Floating                     21-AUG-1978 18:57:18   VAX-11 MACRO X0.3-11               Page   2

01-6            HISTORY  ; Detailed Current Edit History                                                                         (2)



                                     0000    46 	.SBTTL	HISTORY		; Detailed Current Edit History

                                     0000    47 

                                     0000    48 

                                     0000    49 ; Edit History for Version 01 of LIB$CVTDF

                                     0000    50 ;

                                     0000    51 

LIB$CVTDF       ; Convert Double to Floating                     21-AUG-1978 18:57:18   VAX-11 MACRO X0.3-11               Page   3

01-6            DECLARATIONS                                                                                                     (3)



                                     0000    53 	.SBTTL	DECLARATIONS

                                     0000    54 

                                     0000    55 ;

                                     0000    56 ; INCLUDE FILES:

                                     0000    57 ;

                                     0000    58 

                                     0000    59 ;

                                     0000    60 ; EXTERNAL SYMBOLS:

                                     0000    61 ;

                                     0000    62 

                                     0000    63 

                                     0000    64 	.EXTRN	LIB$SIG_TO_RET		; Library routine to convert a signal

                                     0000    65 					; to an error return to caller

                                     0000    66 					; if the establisher

                                     0000    67 					; R0 = signaled condition

                                     0000    68 ;

                                     0000    69 ; MACROS:

                                     0000    70 ;

                                     0000    71 	$CHFDEF				; SIGNAL symbol definitions

                                     0000    72 ;

                                     0000    73 ; EQUATED SYMBOLS:

                                     0000    74 ;

                                     0000    75 

                                     0000    76 ;

                                     0000    77 ; OWN STORAGE:

                                     0000    78 ;

                                     0000    79 

                                     0000    80 ;

                                     0000    81 ; PSECT DECLARATIONS:

                                     0000    82 ;

                                     0000    83 

                                 00000000    84 	.PSECT	LIB$CODE PIC,SHR,LONG,EXE,NOWRT

                                     0000    85 					; program section for LIB$ code

                                     0000    86 

LIB$CVTDF       ; Convert Double to Floating                     21-AUG-1978 18:57:18   VAX-11 MACRO X0.3-11               Page   4

01-6            LIB$CVTDF - Convert Double to Floating and chec                                                                  (4)



                                     0000    88 	.SBTTL	LIB$CVTDF - Convert Double to Floating and check overflow 

                                     0000    89 

                                     0000    90 ;++

                                     0000    91 ; FUNCTIONAL DESCRIPTION:

                                     0000    92 ;

                                     0000    93 ;	LIB$CVTDF converts a Double precision floating point scalar

                                     0000    94 ;	to a single precision floating point scalar and checks

                                     0000    95 ;	for floating point overflow.

                                     0000    96 ;

                                     0000    97 ; CALLING SEQUENCE:

                                     0000    98 ;

                                     0000    99 ;	Status.wlc.v = FOR$CVTDF (double.rd.r, floating.wf.r)

                                     0000   100 ;

                                     0000   101 ;

                                     0000   102 ; INPUT PARAMETERS:

                                     0000   103 ;

                           00000004  0000   104 	double = 4			; first arg is adr. of double prec. scalar

                                     0000   105 ;

                                     0000   106 ; IMPLICIT INPUTS:

                                     0000   107 ;	NONE

                                     0000   108 ;

                                     0000   109 ; OUTPUT PARAMETERS:

                                     0000   110 ;

                           00000008  0000   111 	single = 8			; second arg is adr. of single prec. scalar

                                     0000   112 ;

                                     0000   113 ; IMPLICIT OUTPUTS:

                                     0000   114 ;	NONE

                                     0000   115 ;

                                     0000   116 ; COMPLETION CODES:

                                     0000   117 ;

                                     0000   118 ;	Success if no floating overflow, otherwise failure

                                     0000   119 ;

                                     0000   120 ; SIDE EFFECTS:

                                     0000   121 ;	NONE

                                     0000   122 ;

                                     0000   123 ;--

                                     0000   124 

                                     0000   125 

                                     0000   126 

                               0000' 0000   127 	.ENTRY	LIB$CVTDF, 0		; standard call-by-reference entry

                                     0002   128 

            6D   00000000'EF     DE  0002   129 	MOVAL	L^LIB$SIG_TO_RET, (FP)			; setup handler

         08 BC         04 BC     76  0009   130 	CVTDF	@double(AP), @single(AP)	; convert double to floating

                                     000E   131 					; trap on overflow to handler

                                     000E   132 					; which will unwind an return err cond

                                     000E   133 					; in R0 to caller of LIB$CVTDF

            50            01     CE  000E   134 	MNEGL	#1, R0			; success status code

                                 04  0011   135 	RET				; return

                                     0012   136 

                                     0012   137 	.END

LIB$CVTDF       ; Convert Double to Floating                     21-AUG-1978 18:57:18   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (4)



CHF$L_MCHARGLST  00000008            

CHF$L_MCH_ARGS   00000000            

CHF$L_MCH_DEPTH  00000008            

CHF$L_MCH_FRAME  00000004            

CHF$L_MCH_SAVR0  0000000C            

CHF$L_MCH_SAVR1  00000010            

CHF$L_SIGARGLST  00000004            

CHF$L_SIG_ARG1   00000008            

CHF$L_SIG_ARGS   00000000            

CHF$L_SIG_NAME   00000004            

DOUBLE         = 00000004            

FOR$K_ERR_PREFX= 00000018            

GBL...         = 00000000            

LIB$CVTDF        00000000 RG    03   

LIB$SIG_TO_RET   ********   X   01   

MTH$K_ERR_PREFX= 00000016            

MTH__FLOOVEMAT = 00000058            

MTH__FLOUNDMAT = 00000059            

MTH__INVARG    = 00000051            

MTH__LOGZERNEG = 00000053            

MTH__SINSIGLOS = 00000057            

MTH__SQUROONEG = 00000054            

MTH__UNDEXP    = 00000052            

MTH__WRONUMARG = 00000050            

SINGLE         = 00000008            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            00000014      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

LIB$CODE         00000012      03       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

26684. BYTES LEFT IN FREE MEMORY POOL.

390. BYTES OF RECLAIMED MEMORY.

OBJ$:LIBCVTDF,LIS$:LIBCVTDF/-SP=LIB$:S/ML,SRC$:P,LIBCVTDF

5 MLB DIR RDS - 59 GETS TO DEFINE 5 MACROS. 3 INTER. FILE WRITES. 

