From: Boris Gubenko <boris@taveng.enet.dec.com>
Subject: Re: DEC Alpha-> Vax conversion
Date: 1997/03/23 [thread overview]
Message-ID: <3335507A.3CBE4EAB@taveng.enet.dec.com> (raw)
In-Reply-To: 5gr59p$ich@romeo.logica.co.uk
This is a multi-part message in MIME format.
--------------1C41C908177338A144D65AC6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Roger Peden wrote:
>
> Hi,
>
> Does anyone have any experience of converting 64 bit files on an Alpha back to
> a 32 bit VAX readable form?
>
> We have ported an application from VAX to Alpha which as part of its normal
> processing generates a binary file that is read by other third party software.
> Unfortunately this other software is going to remain on a VAX, so we need to
> be able to convert the binary file back. This is quite urgent as the
> application is running live.
>
> We could get someone to write a utility to do this, but if there is some
> generic application out there , it would be useful to have in case of any
> further difficulties in the future.
>
> Replies by e-mail if poss.
>
> Thanks in advance,
>
> Roger Peden
> pedenr@logica.com
--------------1C41C908177338A144D65AC6
Content-Type: text/plain; charset=us-ascii; name="B.B.2"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="B.B.2"
First of all, you have to figure out what 64-bit floating point format
is used while writing the data and what 32-bit floating point format is
expected on the other side.
You can use cvt$convert_float Run-Time Library routine to convert different
floating-point data (the help attached).
Boris Gubenko
------------------------------------------------------------------------------
RTL_ROUTINES
CVT$
CVT$CONVERT_FLOAT
The CVT$CONVERT_FLOAT routine converts floating-point data types
to other supported floating-point data types.
Format
CVT$CONVERT_FLOAT input_value, input_type_code, output_value,
output_type_code, options
Argument
input_value
OpenVMS usage varying_arg
type unspecified
access read only
mechanism by reference
The address of a data area containing a floating-point number
that is to be converted. The input_value argument may contain
floating-point data in F_Floating, D_Floating, G_Floating, H_
Floating, IEEE_S_Floating, IEEE_T_Floating, IEEE_X_Floating, IBM_
Long_Floating, IBM_Short_Floating, or Cray_Floating format. The
value of the input_type_code argument determines the format and
size of the input_value argument.
Input_type_code Format Size in Bytes
CVT$K_VAX_F F_Floating 4
CVT$K_VAX_D D_Floating 8
CVT$K_VAX_G G_Floating 8
CVT$K_VAX_H H_Floating 16
CVT$K_IEEE_S IEEE_S_Floating 4
CVT$K_IEEE_T IEEE_T_Floating 8
CVT$K_IEEE_X IEEE_X_Floating 16
CVT$K_IBM_SHORT IBM_Short_Floating 4
CVT$K_IBM_LONG IBM_Long_Floating 8
CVT$K_CRAY Cray_Floating 8
input_type_code
OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by value
The address of a longword bit mask specifying the type of
floating-point data being passed in the input_value argument.
Valid type codes are:
CVT$K_VAX_F
CVT$K_VAX_D
floating-point data being passed in the input_value argument.
Valid type codes are:
CVT$K_VAX_F
CVT$K_VAX_D
CVT$K_VAX_G
CVT$K_VAX_H
CVT$K_IEEE_S
CVT$K_IEEE_T
CVT$K_IEEE_X
CVT$K_IBM_LONG
CVT$K_IBM_SHORT
CVT$K_CRAY
output_value
OpenVMS usage varying_arg
type unspecified
access write only
mechanism by reference
The address of a data area that receives the converted floating-
point number. The output_value argument can contain floating-
point data in F_Floating, D_Floating, G_Floating, H_Floating,
IEEE_S_Floating, IEEE_T_Floating, IEEE_X_Floating, IBM_Long_
Floating, IBM_Short_Floating, or Cray_Floating format. The value
of the output_type_code argument determines the size and format
of the data placed into the output_value argument.
Output_type_code Format Size in Bytes
CVT$K_VAX_F F_Floating 4
CVT$K_VAX_D D_Floating 8
CVT$K_VAX_G G_Floating 8
CVT$K_VAX_H H_Floating 16
CVT$K_IEEE_S IEEE_S_Floating 4
CVT$K_IEEE_T IEEE_T_Floating 8
CVT$K_IEEE_X IEEE_X_Floating 16
CVT$K_IBM_SHORT IBM_Short_Floating 4
CVT$K_IBM_LONG IBM_Long_Floating 8
CVT$K_CRAY Cray_Floating 8
output_type_code
OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by value
The address of a longword bit mask specifying the type of
floating-point data that the input_value argument will be
converted into and returned in the output_value argument. Valid
type codes are:
CVT$K_VAX_F
CVT$K_VAX_D
CVT$K_VAX_G
CVT$K_VAX_H
CVT$K_IEEE_S
CVT$K_IEEE_T
CVT$K_IEEE_X
CVT$K_IBM_LONG
CVT$K_IBM_SHORT
CVT$K_CRAY
options
OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by value
Conversion option specifier. The options argument is the address
of a longword bit mask in which each option bit set causes the
corresponding option to be used during the conversion.
The following options can be specified using the options
argument:
CVT$M_ROUND_TO_NEAREST
CVT$M_TRUNCATE
CVT$M_ROUND_TO_POS
CVT$M_ROUND_TO_NEG
CVT$M_VAX_ROUNDING
CVT$M_BIG_ENDIAN
CVT$M_ERR_UNDERFLOW
| All the opinions voiced are mine alone and do not reflect anyone else's |
| opinion, including my employer's. |
--------------1C41C908177338A144D65AC6--
prev parent reply other threads:[~1997-03-23 5:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-03-20 5:00 DEC Alpha-> Vax conversion Roger Peden
1997-03-20 5:00 ` Robert Koehler
1997-03-20 5:00 ` Jan Vorbrueggen
1997-03-20 5:00 ` Dr Ivan D Reid, muSR Facility
1997-03-20 5:00 ` Roger Peden
1997-03-20 5:00 ` Adrian Putley
1997-03-25 5:00 ` Stephen Hoff Hoffman
1997-03-21 5:00 ` Immo Huneke
1997-03-23 5:00 ` Boris Gubenko [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox