DOMAIN Pascal Software Release Document
Software Release 9.5
Part No. 005502
Revision 04
This document describes the new features and bugs of
Pascal (compiler version 7) for
DOMAIN software release 9.5.
APOLLO COMPUTER INC.
330 Billerica Road
Chelmsford, Massachusetts 01824
Copyright c 1986 Apollo Computer Inc.
All rights reserved. Printed in U.S.A.
First Printing: January, 1987
Latest Printing: January, 1987
This document was formatted using the FMT tool distributed with the DOMAIN
computer system.
APOLLO and DOMAIN are registered trademarks of Apollo Computer Inc.
AEGIS, DGR, DOMAIN/BRIDGE, DOMAIN/DFL-100, DOMAIN/DQC-100, DOMAIN/Dialogue,
DOMAIN/IX, DOMAIN/Laser-26, DOMAIN/PCI, DOMAIN/SNA, D3M, DPSS, DSEE, GMR, and
GPR are trademarks of Apollo Computer Inc.
Apollo Computer Inc. reserves the right to make changes in specifications and
other information contained in this publication without prior notice, and the
reader should in all cases consult Apollo Computer Inc. to determine whether
any such changes have been made.
THE TERMS AND CONDITIONS GOVERNING THE SALE OF APOLLO COMPUTER INC. HARDWARE
PRODUCTS AND THE LICENSING OF APOLLO COMPUTER INC. SOFTWARE CONSIST SOLELY OF
THOSE SET FORTH IN THE WRITTEN CONTRACTS BETWEEN APOLLO COMPUTER INC. AND ITS
CUSTOMERS. NO REPRESENTATION OR OTHER AFFIRMATION OF FACT CONTAINED IN THIS
PUBLICATION, INCLUDING BUT NOT LIMITED TO STATEMENTS REGARDING CAPACITY,
RESPONSE-TIME PERFORMANCE, SUITABILITY FOR USE OR PERFORMANCE OF PRODUCTS
DESCRIBED HEREIN SHALL BE DEEMED TO BE A WARRANTY BY APOLLO COMPUTER INC. FOR
ANY PURPOSE, OR GIVE RISE TO ANY LIABILITY BY APOLLO COMPUTER INC.
WHATSOEVER.
IN NO EVENT SHALL APOLLO COMPUTER INC. BE LIABLE FOR ANY INCIDENTAL,
INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT
LIMITED TO LOST PROFITS) ARISING OUT OF OR RELATING TO THIS PUBLICATION OR
THE INFORMATION CONTAINED IN IT, EVEN IF APOLLO COMPUTER INC. HAS BEEN
ADVISED, KNEW OR SHOULD HAVE KNOWN OF THE POSSIBILITY OF SUCH DAMAGES.
THE SOFTWARE PROGRAMS DESCRIBED IN THIS DOCUMENT ARE CONFIDENTIAL INFORMATION
AND PROPRIETARY PRODUCTS OF APOLLO COMPUTER INC. OR ITS LICENSORS.
Reader_Notice
This document resides on line in the /doc directory. To print a copy of this
document, use the PRF command with the -npag and -pr options.
PRF <file_pathname> -PR <printer_name> -NPAG
iii
Contents
Section Page
CHAPTER 1 OVERVIEW OF DOMAIN PASCAL SR9.5
1.1 Enhancements at SR9.5. . . . . . . . . . . . . . . . . . . 1-1
1.2 Conformance With ISO Standard Pascal . . . . . . . . . . . 1-2
1.2.1 Corrections to Runtime System and Program Execution. 1-2
1.3 New Warning Messages . . . . . . . . . . . . . . . . . . . 1-2
1.3.1 Choosing a Compiler Version. . . . . . . . . . . . . 1-2
1.4 On-Line Example Programs . . . . . . . . . . . . . . . . . 1-3
1.4 Other Changes. . . . . . . . . . . . . . . . . . . . . . . 1-3
CHAPTER 2 INSTALLATION PROCEDURE
2.1 Conventions and Terminology . . . . . . . . . . . . . . . 2-1
2.2 Planning the Installation . . . . . . . . . . . . . . . . 2-2
2.3 Additional Information About Administrative Installations 2-3
2.4 Installation Procedure. . . . . . . . . . . . . . . . . . 2-4
2.4.1 Administrative Mode. . . . . . . . . . . . . . . . 2-4
2.4.2 User Mode. . . . . . . . . . . . . . . . . . . . . 2-8
CHAPTER 3 DOCUMENTATION
CHAPTER 4 BUGS AND BUG FIXES
4.1 Known Limitations at SR9.5 . . . . . . . . . . . . . . . . 4-1
4.2 Known Bugs in SR9.5. . . . . . . . . . . . . . . . . . . . 4-2
Contents iv
CHAPTER 1
OVERVIEW OF PASCAL SR9.5
This chapter describes the enhancements made to the Pascal compiler from
SR9.2 to SR9.5.
1.1 Enhancements at Revision 9.5
The SR9.5 version of the Pascal compiler contains major improvements to the
global optimizer. New or significantly improved optimizations include:
o Global register allocation of up to 256 variables per procedure.
o Removal of loop-invariant expressions from inside of loops.
o Elimination of redundant or "dead" stores; that is, values that are
computed but never used.
o Revision of the way multiplication by a constant is done so that a
shift-add sequence is used. The shift-add is usually twice as fast as
a MUL instruction.
In addition, procedure call overhead has been significantly reduced in many
cases. When no registers need to be preserved, the minimal overhead time has
been reduced by 40 percent.
For the DNx60 machines, or other machines with a 68020-based processor, the
compiler reorders instructions to improve throughput and avoid stalls.
Version 7 1-1 Pascal Release 9.5
1.2 Conformance with ISO Standard Pascal
This release of Pascal conforms to the ISO Pascal Standard (ISO 7185-1982
Level 0, which excludes conformant arrays). In particular, this means we have
implemented:
o Procedure and function parameters
o The pack and unpack builtin procedures
In addition, we have fixed several problems with the format of floating-point
output so that we now conform to the standard.
DOMAIN Pascal implements the mod operator using the Jensen & Wirth semantics
rather than the ISO standard. However, in order to match the standard, we
added the -iso compiler switch, which causes mod to work the way the standard
defines it.
1.2.1 Corrections to Runtime System and Program Execution
As part of the work to comply with the ISO Pascal Standard, a number of
errors in the Pascal runtime system have been corrected. If you improperly
depended on these defects in previous releases of Pascal, you may find that
your program no longer executes.
For example, the Pascal standard says that it is illegal to call eoln when
eof is true. Previous releases of Pascal did not enforce this restriction.
SR9.5 Pascal correctly issues an error message at runtime and terminates the
erroneous program.
1.3 New Warning Messages
Because of the changes to the optimizer, some of your existing programs that
used to compile without errors or warnings might now compile with warnings.
The document Making_the_Transition_to__SR9.5 describes conditions that can
trigger these new warnings and suggests ways to eliminate the messages.
1.3.1 Choosing a Compiler Version
The document that describes the new warning messages also describes
conditions under which you might need to use the older, SR9.2 version of the
compiler. When you install the SR9.5 Pascal compiler, you also will get the
SR9.2 compiler. If you need to use the older version, compile your file(s)
with the following command:
$ pas_sr9.2 filename [-options]
Pascal Release 9.5 1-2 Version 7
To compile with the SR9.5 version, use the usual command; that is:
$ pas filename [-options]
1.4 On-Line Example Programs
At SR9.0, we introduced the getpas system for retrieving on-line sample
programs written in pascal. These sample programs illustrate features of
the Pascal language, and demonstrate programming with DOMAIN graphics calls
and system calls.
For SR9.5, we've added some new programs to the system, deleted some
obsolete ones, and corrected a few bugs. In some cases, the source code
stored on-line no longer matches the source code printed in the manual. In
these cases, you should trust the on-line example over the printed one.
We realize that the on-line examples require a lot of disk space. Therefore,
we recommend that the system administrator load only one copy of the examples
on the network and that links be set up to point to this copy. This will
allow all users to retrieve sample programs, but will minimize the amount
of disk space required. For example, suppose that the system administrator
loads the Pascal examples onto a node named //file_server. If you want to
access them from another node, you would create links by issuing the
following commands:
$ crl ~com/getpas //file_server/domain_examples/pascal_examples/getpas
$ crl /domain_examples/pascal_examples @
$_ //file_server/domain_examples/pascal_examples
After creating the links, you merely have to enter the following command to
retrieve programs:
$ getpas
1.5 Other Changes
The Summary_of_Technical_Changes in the Preface of the DOMAIN_Pascal_Language
Reference summarizes other technical changes and enhancements for this
release of Pascal.
Please refer to that summary for an overview of all the functions,
procedures, and features added at SR9.5.
Version 7 1-3 Pascal Release 9.5
CHAPTER 2
INSTALLATION PROCEDURE
This chapter describes how to install Pascal for Software Release 9.5. You
can add this software to a user node (one equipped with monitor and keyboard)
or a DOMAIN server processor (DSP) that is running SR9.5 or a more recent
version of the AEGIS or DOMAIN/IX operating system. If the user node or DSP
is not running SR9.5 or a more recent version, follow the appropriate
software update procedures as described in Installing_DOMAIN_Software (Order
No. 008860) or in the appropriate release notes.
NOTE: The user node or DSP must have a minimum of 1600 blocks of
available disk space for a successful installation of this
software.
2.1 Conventions and Terminology
Before you start, make sure you understand these terms and conventions:
Work Node The user node at which you perform the installation
procedure.
Target The directory into which you're installing software. The
target can be a node entry directory (for example, //target)
or any subdirectory (for example, //target/product). If the
target is on a user node, then the work node and the user
node can be the same node.
NOTE: When you are installing software to update a
diskless node, the target is the node entry
directory of the partner node.
Secure network A network that uses a registry of user accounts and access
control lists (ACLs) to control log-in privileges and access
to files and directories. Note that an open network does not
use a registry or ACLs.
Version 7 2-1 Pascal Release 9.5
Source area An on-line master area of DOMAIN software. An administrator
installs software from the distribution media into the source
area and users install software from the source area over the
network. The source area can be a node's entry directory or
any subdirectory.
Source media The media (floppy disks, magnetic tape, cartridge tape, or
another node in the network) that contains the software.
< > Angle brackets ( < > ) enclose the name of a key on the
keyboard.
2.2 Planning the Installation
There is one installation procedure. You can use the procedure in one of
three modes: ADMINISTRATIVE mode, USER mode, or SPECIAL-CASE mode.
ADMINISTRATIVE mode creates a source area by copying the INSTALL program and
the new software from the distribution media to the target. You use the
administrative mode when no source area for this release exists in the
network. See Section 2.3 for more information about administrative-mode
installations.
USER mode involves copying your new software from a source area onto another
node in the network; it's the simplest and most commonly used mode. You can
install in user mode only AFTER an administrative-mode installation has
initialized the source area with the INIT_SOURCE program.
Two default conditions apply to a user-mode installation. The defaults are:
o The INSTALL program automatically copies the new software over the
network from the initialized source area, instead of asking you to
specify the source area.
o The INSTALL program uses the SID "user.sys_admin" during the
installation, rather than your own login SID.
To install in user mode, get the source area's pathname from your system
administrator, then go on to Section 2.4.2.
SPECIAL-CASE mode involves special cases in which you need to override the
user-mode defaults. The special cases are:
o You want to install software from an initialized source area on the
network, but your own login SID gives you more rights to a target's
protected directories than the default SID "user.sys_admin"
o You want to install software from a source other than an initialized
source area (for example, source media)
Pascal Release 9.5 2-2 Version 7
o You want to install additional software in a source area that was
initialized during a previous administrative-mode installation
The installation procedure enters special-case mode when you invoke the
INSTALL program with its -my_sid option. Specifying this option overrides
the user-mode defaults, which means that the INSTALL program (1) uses your
own login SID instead of "user.sys_admin" and (2) prompts for source media
rather than automatically copying the software over the network from an
initialized source area. In all other respects, special-case mode behaves
like one of the other two modes of installation (your choice of source
determines which one).
If you want to install software from an initialized source area on the
network while using your own login SID, follow the directions for user-mode
installations in Section 2.4.2. These directions include provisions for
installing software in special-case mode.
If you want to install software from a source other than an initialized
source area, or you want to install additional software in a previously
initialized source area, follow the directions for an administrative-mode
installation in Section 2.4.1. These directions also include provisions for
installing software in special-case mode.
2.3 Additional Information About Administrative-mode Installations
The target of an administrative-mode installation generally serves as the
source for subsequent user-mode installations (the administrative-mode target
pathname is therefore the same as the user-mode source pathname). User-mode
installations use both the INSTALL program and the software stored in the
source area.
ADMINISTRATIVE MODE USER MODE
SOURCE --------------------> TARGET (user node or DSP)
______
(media) SOURCE -------------------> TARGET
Your choice of target for an administrative-mode installation depends on
whether you want the target node to RUN the software as well as act as a
SOURCE for the software. If you also want the node to run the software, make
the target the node's entry directory (for example, //node). If you just
want the node to contain the software, you should make the target a
subdirectory (for example, //node/product/source_area). In either case,
users should then use the target of your administrative-mode installation as
Version 7 2-3 Pascal Release 9.5
their source area.
You can install different optional software products into the same source
area or into separate source areas. Whichever route you take, you can then
selectively install optional products on user nodes or DSPs from the source
area(s).
If you have a secure network, you must have system administrator rights to
install in administrative mode. Also, during the procedure you must
initialize the source area by running the INIT_SOURCE program. This program
marks the installation program in the source area with special privileges for
subsequent user-mode installations, such as use of the SID "user.sys_admin"
during installation. The INSTALL program can then install software in
protected system directories, even though the user running the program does
not have rights to modify these directories. In open networks, you create a
source area but you don't run INIT_SOURCE, since all users have rights to
modify their system directories.
2.4 Installation Procedure
The following sections describe the administrative mode and the user mode of
installation. To install software in special-case mode, consult Section 2.2
to determine which set of instructions you should follow.
2.4.1 Administrative Mode
NOTE: You can enter "q" or "quit" at any prompt in the INSTALL program to
abort the installation and return to the Shell.
1. If you intend to create a source area for future installations, log
on to a work node using a system administrator account (for example,
my_name.sys_admin.%.%). Otherwise, log on using your own account
(for example, my_name.%.%.%).
2. Set your working directory to the installation target. This target
will become the source area for user installations. It can be a node
entry directory (like //node) or it can be any subdirectory created
prior to the installation (like //node/product/source_area). For
example:
wd //node (AEGIS Shell)
or
cd //node (DOMAIN/IX Shell)
Pascal Release 9.5 2-4 Version 7
3. Insert the source media into the drive and enter the RBAK command
shown below. If you are using a tape cartridge, use the CT option
shown in the example. If you are using a magnetic tape, use the M0
(Mzero) option. If you are using a floppy disk, use the F0 (Fzero)
option.
NOTE: If you are using multiple floppy disks, insert the floppy
disk with the numeral 1 at the end of its label (for
example, "FLP8_product_n.n_1").
All of the RBAK commands shown below create an INSTALL directory on
the target and write the installation software to the directory.
When entering the RBAK command, use lower-case characters to ensure
visibility of the install directory in case-sensitive environments.
Note that you can leave the source media in the drive for use in a
later step; if you remove the source media after executing the RBAK
command, the INSTALL program will later prompt you to re-insert the
media.
RBAK -DEV CT -F 1 install -AS install -L -MS -FORCE -SACL -DU
RBAK -DEV M0 -F 1 install -AS install -L -MS -FORCE -SACL -DU
RBAK -DEV F0 -F 1 install -AS install -L -MS -FORCE -SACL -DU
4. Set your working directory to the INSTALL directory on the target.
For example:
wd //node/install (AEGIS Shell)
or
cd //node/install (DOMAIN/IX Shell)
5. Execute the INSTALL program and follow the prompts. If you are
installing software in special-case mode, use the -my_sid option.
For ADMINISTRATIVE MODE, type:
install
For SPECIAL-CASE MODE, type:
install -my_sid
Version 7 2-5 Pascal Release 9.5
6. The program may prompt you to enter an installation type, based on
what products already exist in the source area. If it does, answer
OPT and proceed. For example:
****************************************
* SOFTWARE INSTALLATION -- Version n.n *
****************************************
Software installation TYPES are:
STD -- Install standard software
RESTART -- Restart the software installation
ACL -- Set ACLs for existing software
CLEANUP -- Run the Cleanup Procedure for ADD MODE installations
OPT -- Install optional software (e.g., Pascal, FORTRAN)
Please enter installation TYPE: OPT
7. When the program displays the names of one or more optional
products, enter the name of the optional product that you want to
install. For example, to install the Domain Pascal Compiler SR9.5
software you would type "PASCAL", as shown in the sample menu
below.
Name Description Disk Blocks Needed
(Adding New Software)
PASCAL Domain Pascal Compiler SR9.5 1600
OTHER If the optional product that you would like to install
is not listed above, choose OTHER.
*Note: When you choose OTHER, you are asked a few questions
then shown a display of Apollo's optional products. Check
with your system administrator to determine which products
your site has purchased and in which directory these
products have been installed.
Enter the name of a single product you would like to install: PASCAL
8. When prompted for the name of the target, enter the appropriate
pathname (that is, the node entry directory or subdirectory that you
specified in Step 2). For example:
The TARGET is the node or subdirectory on which you are installing
software. (e.g., '//my_node' or '//my_node/subdirectory')
Enter Target: //node
Pascal Release 9.5 2-6 Version 7
9. The INSTALL program prompts for the source media. Enter your
choice.
Source MEDIA is one of:
CTAPE -- Cartridge Tape
MTAPE -- Magnetic Tape
FLOPPY -- 8" or 5 1/4" Floppies
NET -- An area on the network with valid Software
Enter Source Media:
10. The INSTALL program may ask you to insert the media into the drive.
Insert the media and press <RETURN>.
11. The INSTALL program installs the software, listing each file it
copies from the source media. If the software resides on multiple
floppy disks, the program prompts you to mount (that is, insert) the
next disk and to press <RETURN> to continue.
When the INSTALL program finishes installing the software, it
displays the following menu:
Options:
RERUN -- There were errors in the transcript
pad and you wish to rerun the installation.
FINISH -- The installation ran to completion error free.
There is no additional optional software you
wish to install.
CONTINUE -- Install additional optional software.
If you encountered any errors during the installation, correct the
problem(s) and select RERUN. To locate error messages issued during
installation, search backwards for the characters @? (an at sign
followed by a question mark) in the installation's transcript pad.
If there were no errors, choose CONTINUE or FINISH. Selecting
CONTINUE brings you back to the beginning of the INSTALL program;
selecting FINISH terminates the program. If you were installing
software from magnetic tape, cartridge tape, or floppy disks, you
can now remove the media from the drive.
12. If you have a secure network and you want the target of your
installation to be used as a source area for future installations,
run the INIT_SOURCE program (also run the program if you are adding
software to a previously initialized source area). You must be
logged in as a system administrator to perform this step.
Version 7 2-7 Pascal Release 9.5
Invoke INIT_SOURCE at the Shell prompt. When prompted, enter the
pathname of the new source area (which is currently the target of
your administrative-mode installation). Here is an example:
init_source
Please enter the name of the SOURCE AREA
for your network (e.g., '//NODE/SOURCE_AREA'):
//node
The source area for your network
has been set to: //node
This is the end of the administrative-mode installation procedure.
2.4.2 User Mode
NOTE: You can enter "q" or "quit" at any prompt in the INSTALL program to
abort the installation and return to the Shell.
1. Log on to a work node using your own account (for example,
my_name.%.%.%).
2. Set your working directory to the INSTALL directory in the source
area (if necessary, ask your system administrator for the pathname).
For example:
wd //node/install (AEGIS Shell)
or
cd //node/install (DOMAIN/IX Shell)
3. Execute the INSTALL program and follow the prompts. If you are
installing software in special-case mode, use the -my_sid option.
For USER MODE, type:
install
For SPECIAL-CASE MODE, type:
install -my_sid
Pascal Release 9.5 2-8 Version 7
4. The program may prompt you to enter an installation type, based on
what products already exist in the source area. If it does, answer
OPT and proceed. For example:
****************************************
* SOFTWARE INSTALLATION -- Version n.n *
****************************************
Software installation TYPES are:
STD -- Install standard software
RESTART -- Restart the software installation
ACL -- Set ACLs for existing software
CLEANUP -- Run the Cleanup Procedure for ADD MODE installations
OPT -- Install optional software (e.g., Pascal, FORTRAN)
Please enter installation TYPE: OPT
5. When the program displays the names of one or more optional
products, enter the name of the optional product that you want to
install. For example, to install the Domain Pascal Compiler SR9.5
software you would type "PASCAL", as shown in the sample menu
below.
Name Description Disk Blocks Needed
(Adding New Software)
PASCAL Domain Pascal Compiler SR9.5 1600
OTHER If the optional product that you would like to install
is not listed above, choose OTHER.
*Note: When you choose OTHER, you are asked a few questions
then shown a display of Apollo's optional products. Check
with your system administrator to determine which products
your site has purchased and in which directory these
products have been installed.
Enter the name of a single product you would like to install: PASCAL
6. When prompted for the name of the target, enter the appropriate
pathname (that is, a node entry directory or subdirectory). For
example:
The TARGET is the node or subdirectory on which you are installing
software. (e.g., '//my_node' or '//my_node/subdirectory')
Enter Target: //node
Version 7 2-9 Pascal Release 9.5
7. The INSTALL program may prompt for the source media. If so, enter
NET.
Source MEDIA is one of:
CTAPE -- Cartridge Tape
MTAPE -- Magnetic Tape
FLOPPY -- 8" or 5 1/4" Floppies
NET -- An area on the network with valid Software
Enter Source Media: net
8. The INSTALL program may prompt for the source area. If so, enter
the pathname (if you don't know it, ask your system administrator).
For example:
The SOURCE AREA is the node or subdirectory from which you are
copying software. (e.g., '//node' or '//node/subdirectory')
Enter Source Area: //node
9. The INSTALL program installs the software, listing the name of each
file it copies from the source area. Upon completion, the INSTALL
program displays the following menu:
Options:
RERUN -- There were errors in the transcript
pad and you wish to rerun the installation.
FINISH -- The installation ran to completion error free.
There is no additional optional software you
wish to install.
CONTINUE -- Install additional optional software.
If you encountered any errors during the installation, correct the
problem(s) and select RERUN (if necessary, consult your system
administrator for assistance). To locate error messages issued
during installation, search backwards for the characters @? (an at
sign followed by a question mark) in the installation's transcript
pad.
If there were no errors, choose CONTINUE or FINISH. Selecting
CONTINUE brings you back to the beginning of the INSTALL program;
selecting FINISH terminates the program.
This is the end of the user-mode installation procedure.
Pascal Release 9.5 2-10 Version 7
CHAPTER 3
DOCUMENTATION
The DOMAIN_Pascal_Language_Reference has been revised for this release of the
compiler. Change bars in the margins mark alterations from the previous
version of the manual.
Version 7 3-1 Pascal Release 9.5
CHAPTER 4
BUGS AND BUG FIXES
4.1 Known Limitations at SR9.5
The following is a list of known limitations in SR9.5 DOMAIN Pascal:
o Comparing packed records can produce inaccurate results. This is
because a packed record may have unallocated holes in it whose values
will be tested by the comparison code. Since storage space for
packed records is not cleared when the record is allocated, "garbage"
bits encountered in the comparison will make a truly equal pair of
records fail the test for equality.
This error also can occur with unpacked records. For example:
type
xrec = record
a : char;
b : integer;
end;
There is a one-byte filler between a and b so that b can be aligned
on a word boundary. If your code then includes the following:
var
r,s : xrec;
.
.
.
if r = s then . . .
the compiler would generate code to compare the one-byte fillers as
well as a and b. Since those fillers never are initialized, they
might not be equal.
o If you call the OPEN procedure with a variable as the pathname, then
you should initialize the variable to blanks before assigning the
Version 7 4-1 Pascal Release 9.5
actual pathname. If you don't do this, the system may attempt to open
an unexpected pathname and return an error message.
o If you use the short format for specifying routine options (that is,
without the explicit options keyword), there are some restrictions
regarding the order in which you can list the options. Internal or
val_param, if present, must appear before forward or extern. Also,
you cannot list both internal and val_param using the short format.
Regardless of the format you use for specifying options, you cannot
list both forward and extern.
4.2 Known Bugs at SR9.5
None.
Pascal Release 9.5 4-2 Version 7