![]() |
![]() HP OpenVMS Systems |
![]() |
DEC Ada
|
Previous | Contents | Index |
The 64-bit Alpha architecture provides many benefits, particularly in the areas of data representation, data access, and data alignment. However, porting from the 32-bit VAX architecture involves various issues. Table 11-3 highlights the portability issues with pointers to additional information in this guide and notes.
Topic | Pointers and Notes |
---|---|
Integer types |
Section 2.1, Table 2-1
Size of LONG_INTEGER differs between platforms. |
Floating-point numbers and
representations |
Section 2.2, Table 2-2, Table 2-3
On VAX systems, floating-point numbers are represented as VAX floating-point types. On DIGITAL UNIX systems, floating-point numbers are represented as IEEE floating-point types. There are no floating-point representations common to both systems. |
Pragma FLOAT_REPRESENTATION |
Section 2.2.1
On VAX systems, the default and allowable value is VAX_FLOAT. On DIGITAL UNIX, the default and allowable value is IEEE_FLOAT. |
Pragma LONG_FLOAT |
Section 2.2.2
This pragma is available on OpenVMS systems only. For this pragma to have effect on VAX systems, it must have a value of VAX_FLOAT. |
Representation attributes for floating-point types |
Section 2.2.3
The values of the representation attributes for floating-point types are summarized in Table 2-5. |
Model numbers | The model numbers for each floating-point type can be found in Table 2-6. |
Safe numbers | The safe numbers for each floating-point type can be found in Table 2-7. |
Operations on fixed-point types |
Section 2.3
Unless specified otherwise, handled as follows:
|
Component alignment |
Section 2.10
Default alignments differ across systems. |
Size specification for discrete types | Section 2.1, Section 2.3, Section 2.11.1 |
Record representation clause alignment | Section 2.5, Section 2.10 |
Address clauses | Section 2.7 |
Access types | Section 2.11 |
Pragmas |
Chapter 3
DIGITAL supports a similar set of pragmas across platforms. For specific details, see Chapter 3. |
Pragma INTERFACE |
Chapter 3
Pragma INTERFACE recognizes the following language names:
|
Pragma SYSTEM_NAME |
Chapter 3
Takes an enumeration literal as its single argument as follows:
|
Delay statements and related issues |
Section 4.6.2
This section covers platform differences relating to delay statements, type DURATION, SYSTEM.TICK, type TIME, and function CLOCK. |
Type AST_HANDLER | Provided on OpenVMS systems only. |
Tasking |
Chapter 4
This chapter should be read in its entirety to understand the differences in the implementation of tasking on these two platforms. |
Threads/DECthreads |
Section 4.1
DIGITAL UNIX uses DECthreads to implement tasking. DECthreads routines can be called from DEC Ada programs running on DIGITAL UNIX systems. On VAX, the Ada RTL has its own threading system. DECthreads routines cannot be called from DEC Ada programs running on VAX systems. |
Task ID assignment | Section 4.1.1 |
Disabling time slicing | Section 4.3.2 |
Pragma TIME_SLICE | Section 4.3.2 |
Task scheduling |
Section 4.3
On DIGITAL UNIX systems, the operating system schedules Ada tasks along with other threads that are currently running. On OpenVMS VAX systems, the operating system issues the process and the Ada RTL divides up tasks within the process. |
Scheduling strategies |
Section 4.3.1
On VAX, the default is FIFO with preemption. On Alpha systems, the default is round-robin with preemption. |
Assigning and controlling task priorities | Section 4.3.3 |
Duration of a time slice |
Section 4.3.2
On OpenVMS systems, the duration of a time slice can be specified. |
Subtype PRIORITY |
Section 4.3.3
On DIGITAL UNIX systems, DEC Ada allows task priorities to be changed dynamically at run time to values of the subtype PRIORITY, as well as to the values of DIGITAL UNIX real-time and system priorities. |
External interrupts |
Section 4.4, Section 4.5
OpenVMS systems use ASTs to respond to certain events detected by the operating system and the pragma AST_ENTRY to identify an entry that will handle an AST. On DIGITAL UNIX systems, external interrupts can be associated with task entries through operating system signals. |
Shared variables |
Section 4.6.3
See this section for differences in the implementation of the pragma SHARED on VAX and Alpha systems. |
Package SYSTEM differences | Section titled Package SYSTEM Platform Differences in Chapter 6 |
Input-output |
Chapter 5
On VAX systems, DEC Ada uses OpenVMS RMS to perform operations on external files. On DIGITAL UNIX systems, DEC Ada uses system calls. The attributes of the external file, the storage medium, and the input-output package determine which operations can be used to manipulate data. |
Library of predefined units | Chapter 6 |
Implementation-defined packages |
Section 6.2
See this section for lists of packages common to all platforms, available on DIGITAL UNIX only, and available on ULTRIX only. |
Bindings | Section 6.4 |
Program library units | Section 7.1.1 |
Compilation/program library management |
Section 7.1.2
Commands used in compilation and program library management differ between these two platforms. See Table 7-2 for a summary of the commands on both platforms. |
Working with multiple libraries |
Section 7.1.3
Commands used in working with multiple libraries differ between these two platforms. |
Exceptions |
Section 7.4
On OpenVMS systems, exceptions are handled using the OpenVMS condition-handling mechanism. On DIGITAL UNIX, exception handling is implemented using the DIGITAL UNIX calling standard. |
Mixed-language programming |
Section 10.3
In general, all systems support the same interface. However, when you mix code from different languages, some details differ, for example:
|
Package SYSTEM-defined constants | Table 10-1 |
Debugging facilities |
Chapter 9, Section 9.1, Section 9.2
On VAX systems, the OpenVMS Debugger provides extensive facilities to aid in debugging. On DIGITAL UNIX systems, DEC Ada programs can be debugged using one of several debuggers, including DECladebug for DIGITAL UNIX systems. |
Software development tools | Table 1-1 |
Main areas of difference are as follows:
Table 11-4 highlights these topics and others of concern when considering a port between these two platforms. It also provides pointers to additional information in this guide and, where appropriate, notes on the individual topics.
Topic | Pointers and Notes |
---|---|
Character set |
Section 10.1
In DEC Ada on ULTRIX, each graphic character corresponds to a unique code of ISO 646. In DEC Ada on DIGITAL UNIX each graphic character corresponds to a unique code of ISO 8859/1 (Latin-1). In DEC Ada on ULTRIX, the internal codes for the enumeration literal STANDARD.CHARACTER are in the range 0 .. 127. In DEC Ada on DIGITAL UNIX the internal codes are in the range 0 .. 255. |
Enumeration types | In DEC Ada on ULTRIX and DIGITAL UNIX, for simple enumeration objects and enumeration components of unpacked arrays and records, the compiler chooses 1 byte (8 bits), 2 bytes (16 bits), or 4 bytes (32 bits)--whichever is smallest but adequate--to represent an object of an enumeration type. On DIGITAL UNIX, 8 bytes (64 bits)is also available. |
Integer types | Section 2.1, Table 2-1 |
Floating-point numbers and
representations |
Section 2.2, Table 2-2 Table 2-3
IEEE format is used by both DIGITAL UNIX and ULTRIX. |
Pragma FLOAT_REPRESENTATION | Section 2.2.1 |
Operations on fixed-point types |
Section 2.3
Unless specified otherwise, on Alpha, all results are rounded. |
Record representation clause alignment | Section 2.5 |
Component alignment |
Section 2.10
Default alignments differ across systems. By convention on Digital UNIX and ULTRIX systems, all noncomposite components are aligned on natural boundaries. The Alpha hardware runs more efficiently with naturally aligned data. |
Size specification for discrete types |
Section 2.1, Section 2.3, Section 2.11.1
On DIGITAL UNIX and ULTRIX systems, the maximum size is 64 bits for integer and enumeration types and 32 bits for fixed-point types. |
Address clauses | Section 2.11 |
Delay statements and related issues |
Section 4.6.2
This section covers platform differences relating to delay statements, type DURATION, SYSTEM.TICK, type TIME, and function CLOCK. |
SYSTEM.ADDRESS size | Section 2.7 |
Access type size | Section 2.7 |
Type AST_HANDLER | Provided on OpenVMS systems only. |
Pragmas |
Chapter 3
See especially EXPORT_OBJECT, IMPORT_OBJECT,
|
Pragma INTERFACE | Chapter 3 |
Pragma SYSTEM_NAME |
Chapter 3
Takes an enumeration literal as its single argument as follows: DEC_OSF1_AXP (on DIGITAL UNIX systems) |
Tasking |
Chapter 4
This chapter should be read in its entirety to understand the differences in the implementation of tasking on these two platforms. |
Threads/DECthreads | Section 4.1 |
Task storage allocation | Section 4.2 |
Task stack | Section 4.2.2 |
Task scheduling | Section 4.3 |
Scheduling strategies |
Section 4.3.1
On Alpha systems, the default is round-robin with preemption. |
Pragma TIME_SLICE | Section 4.3.2 |
Subtype PRIORITY |
Section 4.3.3
On DIGITAL UNIX systems, DEC Ada allows task priorities to be changed dynamically at run time to values of the subtype PRIORITY, as well as to the values of DIGITAL UNIX real-time and system priorities. |
Handling signals from tasks | Section 4.5 |
Shared variables |
Section 4.6.3
See this section for implementation details for the pragmas SHARED and VOLATILE on Alpha systems. |
UNSIGNED_LONGWORD | UNSIGNED_LONGWORD is 32-bits. Addresses on DIGITAL UNIX systems are 64-bits; on ULTRIX, 32-bits. Therefore, DIGITAL recommends using the generic package ADDRESS_OPERATIONS. |
Conversions between types INTEGER and ADDRESS | Type INTEGER is 32-bits and type ADDRESS is 64-bits. Therefore, DIGITAL recommends using the generic package ADDRESS_OPERATIONS when converting between these types. |
The FORM parameter | Section 5.2.2 for DIGITAL UNIX information and Section 5.2.3 for ULTRIX information. |
Relative and indexed files |
Available on OpenVMS systems only.
DEC Ada defines "relative access" and "indexed access" on OpenVMS systems only. |
TEXT_IO | TEXT_IO is provided for OpenVMS systems only. |
Predefined instantiations of TEXT_IO packages | Table 5-1 |
Package STANDARD | On DIGITAL UNIX systems, the package STANDARD is named _STANDARD. |
Library of predefined units |
Chapter 6
On DIGITAL UNIX systems, when a new program library is created, a default program library context that includes all the units from the predefined library is associated with the newly created library. The predefined library is identified in the default context as /usr/lib/adalib . |
Bindings | Section 6.4 |
Platform differences reflected in Package SYSTEM |
Section titled Package SYSTEM Platform Differences in Chapter 6
See this section for lists of packages common to all platforms, available on DIGITAL UNIX only, and available on ULTRIX only. |
Interface |
Chapter 7
Information can be communicated to a DEC Ada program using command-line arguments and file or interactive input-output facilities. On DIGITAL UNIX systems, information can also be communicated using system-specific features such as environment variables, shared memory segments, semaphore, pipes, fifos, and sockets. |
Program library units | Section 7.1.1 |
Pragma EXPORT_VALUED_PROCEDURE |
Section 7.1.1
When a main function or main procedure delared with this pragma returns a discrete value whose size is less than 64 bits on DIGITAL UNIX systems, the value is zero- or sign-extended as appropriate. |
Exception handling |
Section 7.4
On DIGITAL UNIX, exception handling is implemented using the DIGITAL UNIX calling standard. On ULTRIX systems, exception handling is implemented using the routines and data structures provided in the ULTRIX header file exception.h . |
Handling DIGITAL UNIX signals |
Exceptions can handle those DIGITAL UNIX signals that indicate an
error. Other DIGITAL UNIX signals cannot be handled using exception
handlers.
If an Ada subprogram handled a DIGITAL UNIX signal that is signaled from an external routine, the handler causes the signal to behave according to Ada semantics. In other words, control is transferred to the handler. Control is not returned to the process context where the signal occurred. (The default behavior of a DIGITAL UNIX signal handler is to return control to where the signal occurred.) Both the exception choice others and the predefined exception NON_ADA_ERROR can be used to handle DIGITAL UNIX signals. If a user-defined signal handler is used, it can interfere with Ada exception handling and adversely affect the behavior of the program. |
Working with multiple libraries |
Section 7.1.3
On DIGITAL UNIX systems, DEC Ada provides program library contexts to work with multiple program libraries. See Table 7-1 for commands. |
Compilation/program library
management |
Section 7.1.2
See Table 7-2 for a summary of the commands on these platforms. |
Format and content of user listings | On DIGITAL UNIX, the ADALISFLAGS environment variable can be used. |
Errors, warnings, messages | Section 7.5 |
Mixed-language programming |
Section 10.3
The mechanism DESCRIPTOR is not supported on DIGITAL UNIX systems because those descriptors have only 32 bits available for an address. Instead, dope vectors are used. (However, the mechanism dope vectors cannot be specified.) The package C_TYPES is not supported on ULTRIX systems. |
Debugging facilities | Section 9.2 |
Package SYSTEM-defined constants |
Table 10-1
Note platform differences. |
Additional software development tools |
On ULTRIX systems, DIGITAL provides DECset. On ULTRIX and DIGITAL UNIX
systems, DIGITAL provides DEC FUSE, which is a Motif-based graphical
programming environment.
For details, see Table 1-1. |
Table A-1 lists sources of additional information for the topics covered in this guide.
Topic | For More Information |
---|---|
Lexical elements | Chapter 2, DEC Ada Language Reference Manual |
Types | Chapter 3, DEC Ada Language Reference Manual |
Object representation and storage | Relevant run-time reference manual |
Pragma FLOAT_REPRESENTATION | Chapter 3, DEC Ada Language Reference Manual |
Pragma LONG_FLOAT | Chapter 3, DEC Ada Language Reference Manual |
Safe numbers | Chapter 3, DEC Ada Language Reference Manual |
Pragma INLINE, restriction | Chapter 6, DEC Ada Language Reference Manual |
Pragma INTERFACE, restriction | Chapter 13, DEC Ada Language Reference Manual |
Pragma summary, descriptive | Annex B, DEC Ada Language Reference Manual |
Type representation | The relevant run-time reference manuals |
Tasking, concepts | Chapter 9, DEC Ada Language Reference Manual and the relevant run-time reference manuals |
Pragma TIME_SLICE | Chapter 9, DEC Ada Language Reference Manual |
Pragma PASSIVE | Chapter 9, DEC Ada Language Reference Manual |
Pragma PRIORITY | Chapter 9, DEC Ada Language Reference Manual and the relevant run-time reference manual |
Task entries and ASTs | Chapter 9, DEC Ada Language Reference Manual |
Exception handling | Relevant run-time reference manual |
Pragma INLINE_GENERIC | Chapter 12, DEC Ada Language Reference Manual |
Pragma SHARE_GENERIC | Chapter 12, DEC Ada Language Reference Manual |
Representation clauses | Chapter 13, DEC Ada Language Reference Manual |
Pragma COMPONENT_ALIGNMENT | Chapter 13, DEC Ada Language Reference Manual |
Pragma TASK_STORAGE | Chapter 13, DEC Ada Language Reference Manual |
Pragma MAIN_STORAGE | Chapter 13, DEC Ada Language Reference Manual |
Import and export pragmas | Chapter 13, DEC Ada Language Reference Manual |
DEC Ada additions to package SYSTEM | Chapter 13, DEC Ada Language Reference Manual |
Pragma INTERFACE_NAME | Chapter 13, DEC Ada Language Reference Manual |
Compilation options, detailed information | DEC Ada Developing Ada Programs for the relevant platform |
Implementation-dependent language attributes, details | Chapter 13, DEC Ada Language Reference Manual |
Input-output facilities | The relevant run-time reference manual and Chapter 14, DEC Ada Language Reference Manual |
File sharing and record locking | The relevant run-time reference manual and Chapter 14, DEC Ada Language Reference Manual |
Package specifications and explanation of operations provided by each package | Chapter 14, DEC Ada Language Reference Manual |
Predefined language attributes, summary | Annex A, DEC Ada Language Reference Manual |
Package STANDARD | Annex C, DEC Ada Language Reference Manual |
Predefined language environment | Annex C, DEC Ada Language Reference Manual |
DEC Ada program development environment | Developing Ada Programs on DEC OSF/1 Systems or Developing Ada Programs on OpenVMS Systems |
Professional Development Option | Developing Ada Programs on DEC OSF/1 Systems or Developing Ada Programs on OpenVMS Systems |
Smart recompilation | Developing Ada Programs on DEC OSF/1 Systems or Developing Ada Programs on OpenVMS Systems |
Debugging facilities | Developing Ada Programs on DEC OSF/1 Systems or Developing Ada Programs on OpenVMS Systems |
Debugging tasks and exceptions | Developing Ada Programs on DEC OSF/1 Systems or Developing Ada Programs on OpenVMS Systems |
DEC Ada diagnostic messages | Developing Ada Programs on DEC OSF/1 Systems or Developing Ada Programs on OpenVMS Systems |
Performance | Relevant run-time reference manual |
Porting | Developing Ada Programs on DEC OSF/1 Systems or Developing Ada Programs on OpenVMS Systems |
Previous | Next | Contents | Index |