HP OpenVMS Systems Documentation 
VAX MACRO and Instruction Set Reference Manual
8.3.4 QuadwordA quadword is 8 contiguous bytes starting on an arbitrary byte boundary. The 64 bits are numbered from right to left 0 to 63. A quadword is specified by its address, A, which is the address of the byte containing bit 0. When interpreted arithmetically, a quadword is a two's complement integer with bits of increasing significance ranging from bit 0 to bit 62, with bit 63 the sign bit. The value of the integer is in the range 2**63 to +2**631. The quadword data type is not fully supported by VAX instructions. 8.3.5 OctawordAn octaword is 16 contiguous bytes starting on an arbitrary byte boundary. The 128 bits are numbered from right to left 0 to 127. An octaword is specified by its address, A, which is the address of the byte containing bit 0. When interpreted arithmetically, an octaword is a two's complement integer with bits of increasing significance ranging from bit 0 to bit 126, with bit 127 the sign bit. The value of the integer is in the range 2**127 to +2**1271. The octaword data type is not fully supported by VAX instructions. 8.3.6 F_floatingAn F_floating datum is 4 contiguous bytes starting on an arbitrary byte boundary. The 32 bits are labeled from right to left 0 to 31. An F_floating datum is specified by its address, A, which is the address of the byte containing bit 0. The form of an F_floating datum is sign magnitude with bit 15 as the sign bit, bits 14:7 as an excess 128 binary exponent, and bits 6:0 and 31:16 as a normalized 24bit fraction with the redundant mostsignificant fraction bit not represented. Within the fraction, bits of increasing significance range from bits 16 to 31 and 0 to 6. The 8bit exponent field encodes the values 0 to 255. An exponent value of zero, together with a sign bit of zero, is taken to indicate that the F_floating datum has a value of zero. Exponent values of 1 to 255 indicate true binary exponents of 127 to +127. An exponent value of zero, together with a sign bit of 1, is taken as reserved. Floatingpoint instructions processing a reserved operand take a reserved operand fault (see Appendix E). The value of an F_floating datum is in the approximate range .29*10**38 to 1.7*10**38. The precision of an F_floating datum is approximately one part in 2**23; that is, typically 7 decimal digits. 8.3.7 D_floatingA D_floating datum is 8 contiguous bytes starting on an arbitrary byte boundary. The bits are labeled from right to left 0 to 63. A D_floating datum is specified by its address, A, which is the address of the byte containing bit 0. The form of a D_floating datum is identical to an F_floating datum except for additional 32 lowsignificance fraction bits. Within the fraction, bits of increasing significance range from bits 48 to 63, 32 to 47, 16 to 31, and 0 to 6. The exponent conventions and the approximate range of values are the same for D_floating as they are for F_floating. The precision of a D_floating datum is approximately one part in 2**55, typically, 16 decimal digits. 8.3.8 G_floatingA G_floating datum is 8 contiguous bytes starting on an arbitrary byte boundary. The bits are labeled from right to left 0 to 63. A G_floating datum is specified by its address, A, which is the address of the byte containing bit 0. The form of a G_floating datum is sign magnitude, with bit 15 as the sign bit, bits 14:4 as an excess 1024 binary exponent, and bits 3:0 and 63:16 as a normalized 53bit fraction with the redundant mostsignificant fraction bit not represented. Within the fraction, bits of increasing significance range from bits 48 to 63, 32 to 47, 16 to 31, and 0 to 3. The 11bit exponent field encodes the values 0 to 2047. An exponent value of zero, together with a sign bit of zero, is taken to indicate that the G_floating datum has a value of zero. Exponent values of 1 to 2047 indicate true binary exponents of 1023 to +1023. An exponent value of zero, together with a sign bit of 1, is taken as reserved. Floatingpoint instructions processing a reserved operand take a reserved operand fault (see Appendix E). The value of a G_floating datum is in the approximate range .56*10**308 to .9*10**308. The precision of a G_floating datum is approximately one part in 2**52; that is, typically 15 decimal digits. 8.3.9 H_floatingAn H_floating datum is 16 contiguous bytes starting on an arbitrary byte boundary. The 128 bits are labeled from right to left 0 to 127. An H_floating datum is specified by its address, A, which is the address of the byte containing bit 0. The form of an H_floating datum is sign magnitude with bit 15 as the sign bit, bits 14:0 as an excess 16,384 binary exponent, and bits 127:16 as a normalized 113bit fraction with the redundant mostsignificant fraction bit not represented. Within the fraction, bits of increasing significance range from bits 112 to 127, 96 to 111, 80 to 95, 64 to 79, 48 to 63, 32 to 47, and 16 to 31. The 15bit exponent field encodes the values 0 to 32,767. An exponent value of zero, together with a sign bit of 0, is taken to indicate that the H_floating datum has a value of zero. Exponent values of 1 to 32,767 indicate true binary exponents of 16,383 to +16,383. An exponent value of zero, together with a sign bit of 1, is taken as reserved. Floatingpoint instructions processing a reserved operand take a reserved operand fault (see Appendix E). The value of an H_floating datum is in the approximate range .84*10**4932 to .59*10**4932. The precision of an H_floating datum is approximately one part in 2**112, typically, 33 decimal digits. 8.3.10 VariableLength Bit FieldA variablelength bit field is 0 to 32 contiguous bits located arbitrarily with respect to byte boundaries. A variablelength bit field is specified by three attributes:
The specification of a bit field is indicated by the following figure, where the field is the shaded area. For bit strings in memory, the position is in the range 2**31 to 2**311 and is conveniently viewed as a signed 29bit byte offset and a 3bit, bitwithinbyte field. The signextended, 29bit byte offset is added to the address A; the resulting address specifies the byte in which the field begins. The 3bit, bitwithinbyte field encodes the starting position (0 to 7) of the field within that byte. The VAX field instructions provide direct support for the interpretation of a field as a signed or unsigned integer. When interpreted as a signed integer, it is two's complement with bits of increasing significance ranging from bits 0 to S2; bit S1 is the sign bit. When interpreted as an unsigned integer, bits of increasing significance range from bits 0 to S1. A field of size zero has a value identically equal to zero. A variablelength bit field may be contained in 1 to 5 bytes. From a memory management point of view, only the minimum number of aligned longwords necessary to contain the field may be actually referenced. For bit fields in registers, the position is in the range 0 to 31. The position operand specifies the starting position (0 to 31) of the field in the register. A variablelength bit field may be contained in two registers if the sum of position and size exceeds 32. For further details on the specification of variablelength bit fields, see the descriptions of the variablelength bit field instructions in Section 9.2.3. 8.3.11 Character StringA character string is a contiguous sequence of bytes in memory. A character string is specified by two attributes: the address A of the first byte of the string, and the length L of the string in bytes. Thus, the format of a character string is represented as follows: The address of a string specifies the first character of a string. Thus "XYZ" is represented as follows: The length L of a string is in the range 0 to 65,535. 8.3.12 Trailing Numeric StringA trailing numeric string is a contiguous sequence of bytes in memory. The string is specified by two attributes: the address A of the first byte (mostsignificant digit) of the string, and the length L of the string in bytes. All bytes of a trailing numeric string, except the leastsignificant digit byte, must contain an ASCII decimal digit character (0 to 9). The representation for the highorder digits is as follows:
The highestaddressed byte of a trailing numeric string represents an encoding of both the leastsignificant digit and the sign of the numeric string. The VAX numeric string instructions support any encoding; however, Compaq software uses three encodings. These are as follows:
Because compilers of many manufacturers over the years have used the overpunch format and various card encodings, several variations in overpunch format have evolved. Typically, these alternate forms are accepted on input; the normal form is generated as the output for all operations. The valid representations of the digit and sign in each of the latter two formats is indicated in Table 81 and Table 82.
The length L of a trailing numeric string must be in the range 0 to 31 (0 to 31 digits). The value of a zerolength string is zero. The address A of the string specifies the byte of the string containing the mostsignificant digit. Digits of decreasing significance are assigned to increasing addresses. Thus "123" is represented as follows: The trailing numeric string with a value of "123" is represented as follows: 8.3.13 Leading Separate Numeric StringA leading separate numeric string is a contiguous sequence of bytes in memory. A leading separate numeric string is specified by two attributes: the address A of the first byte (containing the sign character), and a length L, which is the length of the string in digits and not the length of the string in bytes. The number of bytes in a leading separate numeric string is L+1 . The sign of a separate leading numeric string is stored in a separate byte. Valid sign bytes are indicated in the following table:
The preferred representation for "+" is ASCII "+". All subsequent bytes contain an ASCII digit character, as indicated in the following table:
The length L of a leading separate numeric string must be in the range 0 to 31 (0 to 31 digits). The value of a zerolength string is zero. The address A of the string specifies the byte of the string containing the sign. Digits of decreasing significance are assigned to bytes of increasing addresses. Thus "+123" is represented as follows: The leading separate numeric string with a value of "123" is represented as follows: 8.3.14 Packed Decimal StringA packed decimal string is a contiguous sequence of bytes in memory. A packed decimal string is specified by two attributes: the address A of the first byte of the string and a length L, which is the number of digits in the string and not the length of the string in bytes. The bytes of a packed decimal string are divided into two, 4bit fields (nibbles). Each nibble except the low nibble (bits 3:0) of the last (highestaddressed) byte must contain a decimal digit. The low nibble of the highestaddressed byte must contain a sign. The representation for the digits and sign is indicated as follows:
The preferred sign representation is 12 for "+" and 13 for "". The length L is the number of digits in the packed decimal string (not counting the sign); L must be in the range 0 to 31. When the number of digits is odd, the digits and the sign fit into a string of bytes whose length is defined by the following equation: L/2 (integer part only) + 1. When the number of digits is even, it is required that an extra "0" digit appear in the high nibble (bits 7:4) of the first byte of the string. Again, the length in bytes of the string is L/2 + 1. The address A of the string specifies the byte of the string containing the mostsignificant digit in its high nibble. Digits of decreasing significance are assigned to increasing byte addresses and from high nibble to low nibble within a byte. Thus, "+123" has a length of 3 and is represented as follows: The packed decimal number "12" has a length of 2 and is represented as follows:
