hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP OpenVMS Calling Standard

HP OpenVMS Calling Standard


Previous Contents Index

5.2.4.3 Native-I64-to-Translated-Alpha PSIG Conversions

Conversion of native I64 arguments and results and translated Alpha arguments and results is trivial; it is concerned solely with moving the already properly formatted data to the appropriate location for the target environment.

5.2.4.4 Translated-Alpha-to-Native-I64 PSIG Conversions

Conversion of translated Alpha arguments and results and native I64 arguments and results is trivial; it is concerned solely with moving the already properly formatted data to the appropriate location for the target environment.

5.2.5 Default Signature Information

Default signature information is defined for common special cases. Such a default is a short-hand description that can always be represented explicitly but may sometimes be more compact than the corresponding explicit representation.

Translated VAX Image Calling a Native Alpha Procedure

Native Alpha Procedure Calling a Translated VAX Image

Translated VAX or Alpha Image Calling a Native I64 Procedure

Native I64 Procedure Calling a Translated VAX or Alpha Image


Chapter 6
OpenVMS Argument Data Types

This chapter defines the argument-passing data types that are used to call a procedure for OpenVMS VAX, Alpha, and I64 environments. All features defined here apply to all OpenVMS systems unless otherwise noted.

Each data type implemented for a high-level language uses one of the following classes of VAX data types for procedure parameters and elements of file records:

When existing data types fail to satisfy the semantics of a language, new data types, including certain language-specific ones, are added to this standard. These data types can generally be passed by immediate value (if 32 bits or less), by reference, or by descriptor.

Each data type code presented in this chapter indicates a unique data format. Use these encodings whenever you need to identify data types to achieve greater commonality across user software.

The encoding given in Sections 6.1 and 6.2 can help you to identify data types, such as in a descriptor. However, in addition to their use in descriptors, these data type codes are also useful for identifying VAX, Alpha, and I64 data types in areas outside the scope of the calling standard. Therefore, each data-type code indicates a unique data format independent of its use in descriptors.

Some data types are composed of a recordlike structure consisting of two or more elementary data types. For example, the F_floating complex (FC) data type is made up of two F_floating data types, and the varying character string (VT) data type is made up of a word (unsigned, WU) data type followed by a character string (T) data type.

Unless stated otherwise, all data types in this standard represent signed quantities. The unsigned quantities do not allocate space for the sign; all bit or character positions are used for significant data.

6.1 Atomic Data Types

Table 6-1 shows how atomic data types are defined and encoded for VAX, Alpha, and I64 environments.

Table 6-1 Atomic Data Types
Symbol Code Name/Description
DSC$K_DTYPE_Z 0 Unspecified

The calling program has specified no data type. The default argument for the called procedure should be the correct type.

DSC$K_DTYPE_BU 2 Byte (unsigned)

8-bit unsigned quantity.

DSC$K_DTYPE_WU 3 Word (unsigned)

16-bit unsigned quantity.

DSC$K_DTYPE_LU 4 Longword (unsigned)

32-bit unsigned quantity.

DSC$K_DTYPE_QU 5 Quadword (unsigned)

64-bit unsigned quantity.

DSC$K_DTYPE_OU 25 Octaword (unsigned)

128-bit unsigned quantity.

DSC$K_DTYPE_B 6 Byte integer (signed)

8-bit signed two's complement integer.

DSC$K_DTYPE_W 7 Word integer (signed)

16-bit signed two's complement integer.

DSC$K_DTYPE_L 8 Longword integer (signed)

32-bit signed two's complement integer.

DSC$K_DTYPE_Q 9 Quadword integer (signed)

64-bit signed two's complement integer.

DSC$K_DTYPE_O 26 Octaword integer (signed)

128-bit signed two's complement integer.

DSC$K_DTYPE_F 10 F_floating

32-bit F_floating quantity representing a single-precision number.

DSC$K_DTYPE_D 1 11 D_floating

64-bit D_floating quantity representing a double-precision number.

DSC$K_DTYPE_G 27 G_floating

64-bit G_floating quantity representing a double-precision number.

+DSC$K_DTYPE_H 2 28 H_floating

128-bit H_floating quantity representing a quadruple-precision number.

DSC$K_DTYPE_FC 12 F_floating complex

Ordered pair of F_floating quantities representing a single-precision complex number. The lower addressed quantity is the real part; the higher addressed quantity is the imaginary part.

DSC$K_DTYPE_DC 13 D_floating complex

Ordered pair of D_floating quantities representing a double-precision complex number. The lower addressed quantity is the real part; the higher addressed quantity is the imaginary part.

DSC$K_DTYPE_GC 29 G_floating complex

Ordered pair of G_floating quantities representing a double-precision complex number. The lower addressed quantity is the real part; the higher addressed quantity is the imaginary part.

+DSC$K_DTYPE_HC 2 30 H_floating complex

Ordered pair of H_floating quantities representing a quadruple-precision complex number. The lower addressed quantity is the real part; the higher addressed quantity is the imaginary part.

++DSC$K_DTYPE_FS 52 S_floating

32-bit IEEE S_floating quantity representing a single-precision number.

++DSC$K_DTYPE_FT 53 T_floating

64-bit IEEE T_floating quantity representing a double-precision number.

++DSC$K_DTYPE_FSC 54 S_floating complex

Ordered pair of S_floating quantities representing a single-precision complex number. The lower addressed quantity is the real part; the higher addressed quantity is the imaginary part.

++DSC$K_DTYPE_FTC 55 T_floating complex

Ordered pair of T_floating quantities representing a single-precision complex number. The lower addressed quantity is the real part; the higher addressed quantity is the imaginary part.

++DSC$K_DTYPE_FX 57 X_floating

128-bit IEEE X_floating quantity representing an extended-precision number.

++DSC$K_DTYPE_FXC 58 X_floating complex

Ordered pair of X_floating quantities representing an extended-precision complex number. The lower addressed quantity is the real part; the higher addressed quantity is the imaginary part.


1While the calling standard supports the manipulation of D_floating and D_floating complex data, compiled code support will invoke conversion from D_floating to G_floating as needed for Alpha and Itanium arithmetic operations, and conversion of G_floating intermediate results back to D_floating when needed for stores to memory or parameter passing. This allows D_floating data to be used in Alpha and Itanium arithmetic operations without required source changes but with results limited to G_floating precision.
2H_floating data is not supported for general use on OpenVMS Alpha and I64 systems. However, conversion routines are supplied to allow users to convert existing H_floating data to other storage representations.
+OpenVMS VAX specific.
++OpenVMS Alpha and I64 specific.

6.2 String Data Types

String data types are ordinarily described by a string descriptor. Table 6-2 shows how the string data types are defined and encoded for all OpenVMS environments.

Table 6-2 String Data Types
Symbol Code Name/Description
DSC$K_DTYPE_T 14 Character string

A single 8-bit character (atomic data type) or a sequence of 0 to 2 16 - 1 8-bit characters (string data type).

DSC$K_DTYPE_VT 37 Varying character string

A 16-bit unsigned count of the current number of 8-bit characters in the following string, followed by a string of 0 to 2 16 - 1 8-bit characters (see Section 6.5 for details). When this data type is used with descriptors, it can only be used with the varying string and varying string array descriptors, because the length field is interpreted differently from the other 8-bit string data types. (See Sections 6.5, 7.8, and 7.9 for further discussion.)

DSC$K_DTYPE_NU 15 Numeric string, unsigned
DSC$K_DTYPE_NL 16 Numeric string, left separate sign
DSC$K_DTYPE_NLO 17 Numeric string, left overpunched sign
DSC$K_DTYPE_NR 18 Numeric string, right separate sign
DSC$K_DTYPE_NRO 19 Numeric string, right overpunched sign
DSC$K_DTYPE_NZ 20 Numeric string, zoned sign
DSC$K_DTYPE_P 21 Packed-decimal string
DSC$K_DTYPE_V 1 Aligned bit string

A string of 0 to 2 16 - 1 contiguous bits. The first bit is bit <0> of the first byte, and the last bit is any bit in the last byte. Remaining bits in the last byte must be 0 on read and are cleared on write. Unlike the unaligned bit string (VU) data type, when the aligned bit string (V) data type is used in array descriptors, the ARSIZE field is in units of bytes, not bits, because allocation is a multiple of 8 bits.

DSC$K_DTYPE_VU 34 Unaligned bit string

The data is 0 to 2 16 - 1 contiguous bits located arbitrarily with respect to byte boundaries. See also aligned bit string (V) data type. Because additional information is required to specify the bit position of the first bit, this data type can be used only with the unaligned bit string and unaligned bit array descriptors (see Sections 7.10 and 7.11).

6.3 Miscellaneous Data Types

Table 6-3 shows how miscellaneous data types are defined and encoded for all OpenVMS environments.

Table 6-3 Miscellaneous Data Types
Symbol Code Name/Description
+DSC$K_DTYPE_ZI 22 Sequence of instructions
+DSC$K_DTYPE_ZEM 23 Procedure entry mask
DSC$K_DTYPE_DSC 24 Descriptor

This data type allows a descriptor to be a data type; thus, levels of descriptors are allowed.

+DSC$K_DTYPE_BPV 32 Bound procedure value (for VAX environment only)

A two-longword entity in which the first longword contains the address of a procedure entry mask and the second longword is the environment value. The environment value is determined in a language-specific manner when the original bound procedure value is generated. When the bound procedure is called, the calling program loads the second longword into R1. When the environment value is not needed, this data type can be passed using the immediate value mechanism. In this case, the argument list entry contains the address of the procedure entry mask and the second longword is omitted.

DSC$K_DTYPE_BLV 33 Bound label value

A two-longword entity in which the first longword contains the address of an instruction and the second longword is the language-specific environment value. The environment value is determined in a language-specific manner when the original bound label value is generated.

DSC$K_DTYPE_ADT 35 Absolute date and time

A 64-bit unsigned, scaled, binary integer representing a date and time in 100-nanosecond units offset from the OpenVMS operating system base date and time, which is 00:00 o'clock, November 17, 1858 (the Smithsonian base date and time for astronomical calendars). The value 0 indicates that the date and time have not been specified, so a default value or distinctive print format can be used.

Note that the ADT data type is the same as the OpenVMS date format for positive values only.


+VAX specific.

6.4 Reserved Data-Type Codes

All codes from 0 through 191 not otherwise defined in this standard are reserved to Hewlett-Packard. Codes 192 through 255 are reserved for Hewlett-Packard custom systems and for customers for their own use.

Table 6-4 lists the data types and codes that are obsolete or reserved to Hewlett-Packard.

Table 6-4 Reserved Data Types
Symbol Code Purpose
DSC$K_DTYPE_CIT 31 Reserved to COBOL (intermediate temporary)
DSC$K_DTYPE_CIT2 64 Reserved to COBOL (intermediate temporary alternative 2)
DSC$K_DTYPE_TF 40 Reserved to DEBUG (Boolean true/false)
DSC$K_DTYPE_SV 41 Reserved to DEBUG (signed bit-field, aligned)
DSC$K_DTYPE_SVU 42 Reserved to DEBUG (signed bit-field, unaligned)
DSC$K_DTYPE_FIXED 43 Reserved to DEBUG (fixed binary---fixed point in Ada and fixed binary in PL/I)
DSC$K_DTYPE_TASK 44 Reserved to DEBUG (task type in Ada)
DSC$K_DTYPE_AC 45 Reserved to DEBUG (ASCIC text)
DSC$K_DTYPE_AZ 46 Reserved to DEBUG (ASCIZ text)
DSC$K_DTYPE_M68_S 47 Reserved to DEBUG (Motorola 68881 single precision, 32-bit) 1
DSC$K_DTYPE_M68_D 48 Reserved to DEBUG (Motorola 68881 double precision, 64-bit) 1
DSC$K_DTYPE_M68_X 49 Reserved to DEBUG (Motorola 68881 extended precision, 96-bit) 2
DSC$K_DTYPE_1750_S 50 Reserved to DEBUG (1750 single precision, 32-bit)
DSC$K_DTYPE_1750_X 51 Reserved to DEBUG (1750 extended precision, 48-bit)
DSC$K_DTYPE_WC 56 Reserved to DEBUG ( setlocale dependent C string)
DSC$K_DTYPE_F80 59 Reserved to DEBUG (Intel Itanium extended precision, 80-bit)
DSC$K_DTYPE_F80C 60 Reserved to DEBUG (Intel Itanium extended precision complex, two 80-bit)
DCS$K_DTYPE_FIR 61 Reserved to DEBUG (Intel Itanium floating-point Register format, 84-bit)
DCS$K_DTYPE_FIRC 62 Reserved to DEBUG (Intel Itanium floating-point Register format complex, two 84-bit)
No symbol defined 36 Obsolete
DSC$K_DTYPE_T2 38 Obsolete
DSC$K_DTYPE_VT2 39 Obsolete


1Differs from Alpha IEEE floating because of byte ordering.
2Differs from Alpha IEEE floating because of byte ordering and size.

6.4.1 Facility-Specific Data-Type Codes

Data-type codes 160 through 191 are reserved to Hewlett-Packard for facility-specific purposes. These codes must not be passed between facilities because different facilities can use the same code for different purposes. These codes might be used by compiler-generated code to pass parameters to the language-specific run-time support procedures associated with that language or with the OpenVMS Debugger.

As shown in Table 6-4, data-type codes 31 and 64 are reserved for the COBOL facility. Codes 40 through 51 and 56 are reserved for the OpenVMS Debugger facility.


Previous Next Contents Index