Iron Spring PL/I Compiler

Linux Version 0.9.2
1 Jul, 2011

Release Notes

Introduction

This document provides information on using the Iron Spring PL/I compiler and compiled programs on the Linux platform. For information on the OS/2 platform, see the corresponding document
readme_os2.

The current version still contains bugs. As a user of beta software, you can help improve the compiler. See the section Reporting bugs.

Trademarks
eComStation is a trademark of Serenity Systems International.
Gnu is a trademark of the Free Software Foundation.
IBM is a trademark of IBM, Inc.
Intel is a trademark of Intel Corporation.
Iron Spring is a trademark of Iron Spring Software.
Linux is a registered trademark of Linus Torvalds.
VAX is a trademark of Hewlett-Packard, Inc.
WATCOM is a trademark of Sybase, Inc. and its subsidiaries.
Library heap manager based on code Copyright (c) 2001-2006 Wolfram Gloger.

License

<boring-legal-stuff>
This license a legal agreement between you and Iron Spring Software. Your use of this software signifies that you agree to the terms of this license.

Iron Spring Software grants you the right to use and copy the Iron Spring PL/I compiler and library freely. You may distribute programs compiled using the compiler and/or linked with the library under any terms you wish without restriction. The source to the library is licensed under the terms of the Gnu Lesser General Public License (LGPL).

All material is copyright Iron Spring Software, 2008, 2009, 2010, 2011.

THE COMPILER AND LIBRARY ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COMPILER AND LIBRARY IS WITH YOU. SHOULD THEY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
</boring-legal-stuff>

Contents

This distribution includes the executable for the PL/I compiler plic, the static library lib/static/libprf.a, and the sources for the library and sample programs.

  pli-0.9.2
    |
    +-----------------------samples----------------lib
    |                          |                    |
 plic                       (Sample sources and     +--------------------------static---include----source-----------alt
 (compiler executable)       %include files,                                   |         |         |                 | 
 (documentation, etc.)       sample makefiles                                  |         |         +--------asm      |
                             and module definition                             |         |   (PL/I source)   |     (alt storage   
                             file).                                            |         |               (assembler management)
                                                                               |  (%include files          source)
                                                                               |    required by                                                                                      
                                                                               |     library).
                                                                               |
                                                                     libprf.a (static library)

Requirements

The folowing software is required to run the Linux version of the compiler:
The following software is recommended:

Restrictions

Version 0.9.2 has a number of restrictions. The most significant are:

Installation

  1. The distribution file is supplied as a gzipped tar file. Unpacking it will create a directory named "pli-0.9.2".
  2. Only the compiler (pli-0.9.2/plic) and the static runtime library (pli-0.9.2/lib/libprf.a) are required.
  3. Move the compiler to a directory in your $PATH such as /usr/bin, and move libprf.a to a directory such as /usr/lib. Alternatatively, you can specify which directory the library is in in your makefiles.
    An installation procedure is provided. cd to the 'pli-0.9.2' directory and type 'make install' (with suitable authority). This procedure moves the compiler to '/usr/bin' and creates a symlink 'plic' referencing it, and moves the library to '/usr/lib' and creates the symlink 'libprf.a'.
  4. Test the sample programs. In this release only static linking is supported. CD to the directory "pli-0.9.2/samples" and type "make". The sample programs "numwrd", "filedump", "libver", "print_listing", and "task" build to executables, the remainder should generate object files.
  5. Test numwrd. Enter "./numwrd 123". The program should display the result "one hundred twenty-three".
  6. You might want access to the %INCLUDE files in "pli-0.9.2/lib/include" or "pli-0.9.2/samples" for your own programming.

A later version will be installable using one or more of the standard package managers.

Using the compiler

The "samples" directory contains three sample makefiles that can be used to compile and link PL/I programs. You should copy these and modify them for your requirements. "LC_make" and "LCC_make" both use gcc to drive the linker; the program entry will be libc's "_start". "SA_make" calls ld directly and should be used only for programs that don't call any C functions. The program entry will be PL/I's "main". In all cases the static PL/I runtime linkary "prf.lib" is required, indicated by "-lprf" in the linker command.

The Iron Spring PL/I Compiler Programming Guide describes the PL/I compiler options available.

Linking PL/I programs

The following examples show different methods of linking PL/I programs.

This command uses gcc to link a PL/I program with libc, and use C's malloc and free for heap storage management.
gcc -o ${EXE} ${OBJ} ${ALTDIR}/fhs.o ${ALTDIR}/ghs.o -lprf -Wl,-M >${MAP}

This command uses gcc to link a PL/I program with libc, and use PL/I's heap storage management.
gcc -o ${EXE} ${OBJ} -lprf -Wl,-M >${MAP}

This command uses ld to link a standalone PL/I program with no reference to libc.
ld -z muldefs -Bstatic -M -e main -t -o ${EXE} \ ${OBJ} \ -lprf \ >${MAP}

Documentation

The Iron Spring PL/I Compiler Programming Guide contains a description of the features of the compiler. Except as noted in the Programming Guide under Compiler Differences and Restrictions this compiler is compatible with the IBM "PL/I for MVS and VM Compiler 1.1". A complete language reference in HTML will be available as part of a future release.

Documentation for the IBM compiler is available online.

Changes in the current version

Changes in version 0.9.2
PL/I multitasking has been added, including the TASK, EVENT, and PRIORITY options of the CALL statement, the WAIT statement, and the COMPLETION and STATUS builtin functions and pseudovariables.
SIZE is now recognized as a synonym for the STORAGE builtin function.
Structure assignments BY NAME are now allowed.
EXTERNAL data items are now aligned on a DWORD (4-byte) boundary instead of 8-byte.
 
Changes in version 0.9.1
The SINH, COSH, TANH, and CS builtins have been added.
The PACKAGE statement is now supported.
The INITIAL CALL option is now supported.
Floating-point pictures are now allowed, for output only.
 
Changes in version 0.9.0
The compiler now supports Linux as a host and a target.
The ERF, ERFC, and EXP builtins have been added.
Page headings have been added to the compiler listings.
 

Bugs fixed in the current version

Bug
number
Fixed
in version
Description
1980.9.2 DO REPEAT should allow nonarithmetic control variable.
1970.9.2 Based variable argument to STORAGE should not require locator.
1780.9.2 Bad descriptor passed for adjustable arg if parm is also adjustable.
1770.9.2 Bad descriptor passed for adjustable string parameter.
1760.9.2 PAGESIZE(0) should suppress formfeeds.
1750.9.2 BIT builtin result may be incorrect.
1740.9.2 TIME builtin always returns 0 ms.
1730.9.2 EXIT statement causes compiler trap in GCALL.
1710.9.2 SKIP format item without relative line defaults to SKIP(0) instead of (1).
1700.9.2 Problems mapping structure containing unions.
1690.9.2 Compiler trap if dummy argument size is larger than 32767.
1680.9.2 Compiler trap on leading spaces in picture repetition factor.
1670.9.2 Compiler trap generating error message on invalid conversion to program control variable.
1650.9.2 Overly aggressive optimization of register assignments causes REGX error 990-02
1640.9.2 Based adjustable data causes various errors.
1620.9.2 SIZE not recognized as synonym for STORAGE builtin.
1610.9.2 Incorrect references generated for members of structure parameters.
1600.9.2 Incorrect assignment of arrays of unaligned bit strings.
1590.9.1 Compiler traps when builtins are called with program control arguments where computational arguments are expected, and visa-versa.
1580.9.1 Various compiler problems using the initial attribute with static unaligned bit strings.
1570.9.1 The HEXIMAGE builtin generates incorrect code when the first argument is a pointer reference (not pointer expression).
1560.9.1 The COMPARE builtin generates incorrect results after fix for bug 148.
1540.9.1 Some comparisons of character data to literals cause error 990, code 05 in MX.
1530.9.1 Incorrect code generated for conversion of scaled pictured data to arithmetic.
1520.9.1 Incorrect scaling on move of arithmentic to pictured data.
1510.9.1 Incorrect code generated for some bit string assignments.
1500.9.1 Remote formats generate incorrect code.
1480.9.1 The COMPARE builtin reverses the order of the operands.
1470.9.1 [Invalid] Unary pointer expression causes compiler trap.
1460.9.1 Converting WORD integer to FLOAT causes error 990, code 14 in MX.
1450.9.1 Entry returning expression with adjustable bounds or lengths does not produce error message.
1440.9.1 ENTRY arguments to procedures with SYSTEM linkage generate errors or incorrect code.

Modifying the Runtime Library

The document
About the Iron Spring PL/I Library Contains information necessary to modify or extend the runtime library. Most users of Iron Spring PL/I will probably not be interesting in making modifications to the library.

Support

No formal support is provided for pre-release versions of Iron Spring PL/I. Bugs will be fixed on a best-efforts basis only, and the fix included in the next distributed version.

A Yahoo! group "ISPLI" (http://tech.groups.yahoo.com/group/ISPLI) is available as a user forum for problems, tips, etc. The developers also monitor this group.

Reporting bugs

For the current version of the compiler, a bug is one of the following:
  1. Any compiler trap.
  2. Incorrect output not caused by a flagged unimplemented feature (compile-time message 995 or run-time UNIMPLEMENTED condition.
  3. Compile-time message 990 (Compiler error).
  4. Output of the compiled program different from that produced when the program is compiled with the IBM compiler, except for differences noted.
Features not implemented in the current version will be added in future versions. In the meantime, their absence should at least be indicated by an error message.

Before reporting a bug, please make sure you are running the most recent release.

The following information is required to report a bug:

  1. A brief description of the problem (trap, incorrect output, etc.)
  2. The host operating system: OS/2 or Linux.
  3. The command-line options used to compile this program.
  4. The current compiler version obtained by running plic -V
  5. A small sample program ilustrating the problem. Please make sure you imbed or supply all the %include files required to compile the sample.
Hopefully, all this information will be small enough to be sent as plain text in a mail message. Otherwise please attach a zip file. No other formats will be accepted.

Mail bug reports to:

   bugs@iron-spring.com


version 0.9.2, 1 Jul, 2011
http://www.iron-spring.com