VAXELN Ada Programming Guide

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      Introduction to VAXELN Ada

  1.1     The VAXELN Ada Program Development Environment

  1.2     Differences from VAX Ada
    1.2.1      Time Slicing
    1.2.2      Asynchronous System Traps
    1.2.3      Relative and Indexed Files
    1.2.4      Form Strings
    1.2.5      Specialized Functionality Available in VAXELN Ada

  2      Program Development

  2.1     Setting Up the Ada Program Library

  2.2     Using the VAX Ada Compiler

  2.3     Linking the Ada Programs
    2.3.1      Including Object Modules from Other Libraries
    2.3.2      Using the ACS EXPORT Command

  2.4     Working in a Mixed VAXELN Ada and VAX Ada Environment

  2.5     Creating a New Binding

  2.6     Calling External Routines from Ada Subprograms

  2.7     Sharing Non-Ada Storage

  2.8     Ada Subprograms Called by the Kernel

  2.9     Writing an Interrupt Service Routine in Ada

  3      Debugging VAXELN Ada Programs

  3.1     The Debugging Environment
    3.1.1      VAXELN Remote Debugger Support for VMS Debugger Features
    3.1.2      VAXELN Terms and Concepts Related to Debugging

  3.2     Compiling and Linking Programs for Debugging

  3.3     Setting up the Remote Debugger Environment

  3.4     Using the VAXELN Remote Debugger
    3.4.1      The DEBUG/REMOTE Command
    3.4.2      Downline Loading During Debugging
    3.4.3      Using HELP
    3.4.4      Exiting from the Remote Debugger
    3.4.5      Interrupting and Reinvoking the Remote Debugger
    3.4.6      Interrupting and Restarting a Remote Debugger Command Session
    3.4.7      Exiting from a Remote Debugger System Session
    3.4.8      Processing Console Input and Output

  3.5     Monitoring Job and System Activity
    3.5.1      Monitoring System Activity
    3.5.2      Creating Jobs
    3.5.3      Deleting Jobs from a VAXELN System
    3.5.4      Selecting a Job to Debug
    3.5.5      Controlling Job Execution
    3.5.6      Changing Job and Task Priorities

  3.6     Controlling Program Execution
    3.6.1      Using the GO command
    3.6.2      Breakpoints, Tracepoints, and Watchpoints

  3.7     Debugging in Local (Kernel) Mode

  3.8     Ada Tasking and Remote Debugging
    3.8.1      Stack Storage
    3.8.2      Monitoring Tasking Performance

  3.9     Sample Remote Debugging Session

  4      Input and Output

  4.1     Files and File Access

  4.2     VAXELN Circuits

  4.3     Naming External Files

  4.4     File Types

  4.5     Standard Input and Output Files

  4.6     Specifying External File Attributes with the File Definition Language (FDL)

  5      Tasking

  5.1     Using Tasks on VAXELN

  5.2     Task Storage Allocation
    5.2.1      Storage Created for a Task Object-the Task Control Block
    5.2.2      Storage Created for a Task Activation-the Task Stack
      5.2.2.1      Controlling the Size of a Main Task Stack
      5.2.2.2      Controlling the Size of Other Task Stacks
    5.2.3      Stack Overflow and Non-Ada Code

  5.3     Task Switching

  5.4     Special Tasking Considerations

  5.5     Calling VAXELN Routines from Tasks

  5.6     Measuring and Tuning Tasking Performance

  6      VAXELN Ada Data Types

  6.1     VAXELN Data Types
    6.1.1      AREA_TYPE Data Type
    6.1.2      AREA_LOCK_VARIABLE Data Type
    6.1.3      DEVICE_TYPE Data Type
    6.1.4      EVENT_TYPE Data Type
    6.1.5      MESSAGE_TYPE Data Type
    6.1.6      MUTEX_TYPE Data Type
    6.1.7      NAME_TYPE Data Type
    6.1.8      PORT_TYPE Data Type
    6.1.9      PROCESS_TYPE Data Type
    6.1.10     SEMAPHORE_TYPE Data Type

  6.2     Numeric Data Types

  6.3     String Data Types
    6.3.1      Fixed-Length Strings
    6.3.2      Varying-Length Strings
      6.3.2.1      Uses of Varying Strings
      6.3.2.2      Varying String Descriptors

  6.4     VMS Services Available with VAXELN Ada

  A   Debugger Command Summary

  A.1     VAXELN Ada Remote Debugger Commands

  A.2     Debugger Command Summary
    A.2.1      Starting and Terminating a Debugging Session
    A.2.2      Controlling and Monitoring Program Execution
    A.2.3      Examining and Manipulating Data
    A.2.4      Controlling Type Selection and Symbolization
    A.2.5      Controlling Symbol Lookup
    A.2.6      Displaying Source Code
    A.2.7      Using Screen Mode
    A.2.8      Editing Source Code
    A.2.9      Defining Symbols
    A.2.10     Using Keypad Mode
    A.2.11     Using Command Procedures and Log Files
    A.2.12     Using Control Structures
    A.2.13     Additional Commands

  B   Sample Application

  B.1     Square-Root Server Program

  B.2     Error-Handling Package

  B.3     Square-Root Server Application Program

  EXAMPLES

  2-1        Shareable Status Text Example

  2-2        Creating a Binding

  2-3        Example Showing the Use of New Bindings

  2-4        Importing a Routine from Another Language

  2-5        Interrupt Service Routine

  3-1        Debugging an Interrupt Service Routine

  3-2        Debugging a VAXELN Ada Program

  FIGURES

  1-1        VAXELN Ada Development Environment

  B-1        Square-Root Server Application

  TABLES

  1-1        Functionality Available in VAXELN Ada

  3-1        System Builder Options for Remote Debugging

  4-1        FDL Primary and Secondary Attributes Available in VAXELN Ada

  5-1        Comparison of VMS and VAXELN Ada Task Implementations

  6-1        VAXELN Ada Data Types for VAXELN Objects