Waterloo BASIC for VM/CMS and MVS/TSO
Software Description
Waterloo BASIC Compiler
Waterloo BASIC is an incremental compiler implemented for System/370
architecture machines running VM/SP CMS and MVS/TSO. Waterloo BASIC
combines the inherent simplicity of the original Dartmouth BASIC with
enhancements for structured programming, powerful string-handling
capabilities and the interactive nature of incremental compilation. The
result is a system which promotes the use of modern program design
techniques, making it an ideal tool for introductory courses in
computing and for the development of application systems.
Waterloo BASIC Optimizer
The Waterloo BASIC Optimizer is a post-processor for programs
compiled using the Waterloo BASIC Compiler. It may be used to increase
the performance of production programs. Experimental results indicate
that most programs execute at least twice as fast using the Optimizer.
Optimized programs function identically to compiled programs. The
same error diagnosis is performed when an optimized program is executed.
The size of an optimized file is smaller than the corresponding size
of a compiled program. This reduces disk space requirements as well as
program load time.
The Waterloo BASIC Optimizer is useful in environments where
programs are executed many times without change or where programs
perform a large amount of computation.
Features of the Waterloo BASIC Compiler
Comprehensive diagnostics, interactive debugging and simple
operational characteristics promote student self-help and ease of use.
- Program statements are compiled one at a time as they are entered
at the terminal. Error diagnostics are displayed as soon as a problem
is evident.
- Programs may be interrupted, changed, and allowed to continue
execution. Debugging is accomplished using BASIC language statements
that are compiled and executed immediately.
- Editor commands allow lines to be added, deleted or changed in a
program. Program source statements may be saved, or the program
environment may be stored and restored eliminating recompilation.
- Character-string management at run-time is dynamic, allowing
strings to vary from 0 to 65535 bytes. An extensive set of built-in
string-processing functions is included.
- Variable names may be as long as desired, allowing names which are
representative of the values they contain.
- A set of control structures has been added to the language to
facilitate structured programming. The WHILE and UNTIL statements may
be used to control the iteration of loops. The IF-ELSE-ENDIF construct
enables groups of statements to be selected for execution.
- Waterloo BASIC supports standard CMS and MVS file types. This
permits data to be manipulated by programs written in other languages,
or by common system utilities. Indexed files allowing record access via
keys are also supported and are implemented based upon standard file
formats. The BASIC file system does not make use of VSAM for file
access.
- Two statements used to control the sorting of files are included.
- Extensive formatting capabilities permit data to be input or output
in a wide variety of formats.
- Structured program control encourages programming in a logical
manner rather than the traditional "Spaghetti code". More emphasis can
be placed on algorithms and program development.
- Under CMS, an intrinsic function is provided which allows CMS
commands, CP commands or EXEC files to be invoked from a BASIC program.
- Descriptions of BASIC statements and commands can be obtained using
the BASIC HELP command.
- Parameters can be passed to both procedure and function program
modules.
- Terminal input and output recording is ideal for beginning
programming assignments since the student does not need specific file
expertise to create an output file suitable for marking.
- Included is a full complement of matrix functions such as matrix
multiplication and matrix inverse which are useful for many engineering
and mathematical problems.
- The Waterloo BASIC Compiler can be implemented as a CMS shared
segment to provide shared code among BASIC users, reduced paging and
lower virtual memory requirements.
- The Waterloo BASIC Compiler is currently available for the
following systems:
- IBM VM/SP CMS
- IBM MVS/TSO
- The Waterloo BASIC Optimizer is currently available for the
following system:
Documentation
The Waterloo BASIC Primer and Reference Manual (Graham,
Welch and McPhee; ISBN 0-919884-22-9; WATCOM Publications, 1983) is the
primary reference for Waterloo BASIC. The text consists of two major
components: a primer which provides a basic introduction to the
language, and a reference manual which comprehensively defines the
syntax and semantics of the Waterloo BASIC language.