Terra Datentechnik Home Home · Modula-2

Stony Brook Modula-2 Development System

(October 19, 1998)

Stony Brook Software's Modula-2 compiler and development system are a programmer's wish list come true. Stony Brook Modula-2 Version 3 is a development package for you that combines a powerful, project based, integrated development environment with a professional optimizing compiler.

You can develop applications for all the major platforms:

  • DOS (16-bit),
  • 32-bit DOS extended mode,
  • 16-bit Windows (Windows 3)
  • 32-bit Windows (Windows 95, Windows NT).
  • Topics

    1. Environment
    2. Editor
    3. Debugger
    4. Compiler
      1. Optimization
    5. Linker
    6. Resource Editor
    7. Modula-2 Language Features
      1. ISO
      2. Extentions
      3. Interrupt Handling
    8. Logitech Modula-2 V4 Compatible Libraries
    9. Logitech Modula-2 V3 Compatible Library
    10. Requirements
    11. Packaging


    The Stony Brook Integrated Development Environment is the ideal way to manage the development of Modula-2 projects including those that involve languages like C or assembly.

    Here are just a few of the Stony Brook environment's features:
    - The environment is project based. You can instantly see all of the files in your project and know their current state of compilation. You can quickly navigate to a file for editing. In short the environment is not just an editor that allows you to compile, but a true development management system. 
    - Projects are not just for programs. A project can be a collection of code to be used by any number of your applications. Just build the appropriate files in one project and let your other projects use it. If you need access to the common code, it is just a double click away. 
    - The environment is extremely flexible. Not only can the environment use the editor debugger, linker, librarian and resource editor provided by Stony Brook, but the environment also allows you to use your own favorite tools. 
    - Editing of multiple files and viewing your project is a snap with this MDI application. 
    - Over 50 compiler options that can be set either on a global or per source file basis. The environment saves options both globally and on a per module basis so that modules that need special settings do not make building your application difficult. The environment is also smart enough to remember the options that the module was last compiled with so that only those modules that are affected by an option change are recompiled. 
    - The environment allows you to specify where object files are placed so that multiple projects can refer to the same sources and be built with different options, even for different platforms.
    - The environment's WIN32 interface allows users to work in a familiar environment. 
    - Context sensitive pop-up menus allow quick access to common actions. 
    - The new scripting language allows you to write automated scripts to do common tasks such as setting options or complete complex builds in a familiar language that reads like Modula- 2. 
    - Syntax errors? Not a problem. Stony Brook's environment knows when errors occur and shows you the source file at the line and column where the errors occurred to let you fix them fast. 
    - Visual cues let you know instantly which modules need compilation and which have special options set.


    This powerful programmer's editor is a great place to work on your sources. These are a few of the features you can look forward to in your editor:
    - Multiple level undo allows you to quickly get rid of all those typos quickly and easily.
    - Autosave keeps your valuable work from being lost.
    - Markers help you quickly navigate through your files. 
    - Character matching helps you quickly find your way around in complex expression or just quickly find out where a comment begins or ends. 
    - The procedure view mode helps you quickly browse the procedures in a module. Once you've found what you're looking for the stroke of a key edits the procedure's code. 
    - Indenting a single line or a block of lines is a piece of cake with the editor's indentation commands. 
    - Auto correct allows you to specify a dictionary of frequently misspelled words and their correct spellings so the editor can fix your misspellings as you type. This feature can also be used to give brief names which the editor will expand up to a line of text that you specify. 
    - Linking editor windows together provides an easy way to compare source files. 
    - Highlighting of lines that have changed during the current edit helps you see at a glance the lines you modified.


    The Stony Brook Debugger gives you the power you need to hunt down those nasty bugs. The WIN32 debugger supports debugging WIN32 and Windows programs*. The DOS based debugger supports debugging DOS and DOS extended mode applications.

    The debugger is a powerful and easy to use tool that provides the following features:
    - Standard breakpoints and execute to location. 
    - Breakpoints that stop after a number of passes for quickly finding a bug when you know the iteration where the bug occurs. 
    - Breakpoints that stop only when an expression is satisfied so you don't have to decide if this is the situation that you want to debug on every execution. 
    - Memory breakpoints to uncover where that crucial alteration of a variable is happening. 
    - Point and click data viewing makes inspecting and modifying the value of an expression simple. 
    - Context sensitive pop-up menus to perform common tasks like setting breakpoints and viewing data. 
    - The registers window which shows the previous and current values of the registers and highlights the values that have changed. 
    - Supports automatic attachment to a WIN32 program when a system exception occurs.
    * Due to operating system limitations Windows (16-bit) programs cannot be debugged under Windows 95. Windows (16-bit) programs can be debugged under Windows NT since it does not contain these limitations.


    The WIN32 based compiler eliminates capacity limitations while improving the optimization performance.
    - Generate code for Windows, WIN32, DOS and 32-bit DOS extended mode. 
    - Highly flexible calling conventions that allow you to call (or be called by) just about any interface in existence. 
    - With the WIN32 compiler there is no hassle with setting up memory managers. - Generate a library from a single source file which allows smart linking with any linker. 
    - Generation of object code to industry standard object formats makes linking with other languages simple. 
    - Powerful optimizations shrink your executables while allowing them to run faster. 
    - Unlike many others the compilers generate multiple error messages when you have multiple errors and provide you with the column as well as the line that the error occurred on. 
    - The compiler runs at a speed of approximately 100'000 lines per minute on a 133 mhz Pentium.


    Ever want your code to run a bit faster? The Stony Brook compiler can help. The Stony Brook compiler has an extensive set of optimizations aimed at generating smaller, faster code.

    Here is a preview of the optimizations you can expect thecompiler to perform:
    - Loop top testing makes loops faster by eliminating jumps. 
    - Common subexpression elimination removes duplicate evaluation of equivalent expressions. 
    - Loop invariant motion moves the evaluation of expressions that don't change during loop execution outside of the loop. 
    - The optimizer will rewrite your loops to use a different index making your loop smaller and faster. 
    - The constant/copy propagation tracks variable and constant equivalencies so that unnecessary assignments can be eliminated. 
    - Unreachable code is eliminated from your program. 
    - Stores to a variable which is no longer used are thrown away. 
    - Jump chaining retargets a jump to a jump to the final destination. 
    - Live variable analysis determines where a variable's value is valid to allow efficient use of registers. 
    - A powerful peephole optimizer replaces instruction sequences with faster, smaller sequences of code. It also helps by replacing memory references with register equivalents when possible. 
    - The compiler contains optimizations to merge identical instruction streams at the beginning and end of parallel branches
    - Data flow analysis allows register information to be preserved through program flows making other optimizations more effective. 
    - Register and local variable lifetime analysis allows the peephole optimizer to reuse registers. 
    - Induction variable analysis looks for variables which increase or decrease linearly during a loop execution. Multiplication of an induction variable by an expression that is invariant over the loop's execution is replaced by the much faster addition or subtraction instruction. 
    - The compiler will use arithmetic identities to simplify expressions. 
    - A flexible scheme for passing parameters in registers when possible helps avoid unnecessary memory references. This option can even be enabled to work across modules. 
    - The compiler allows you to specify whether code size or execution speed is more important to you. The compiler will then use an appropriate strategy to make decisions regarding the benefits of performing a particular optimization. 
    - The compiler will evaluate constant expressions at compile time instead of generating code.


    The WIN32 based linker is fast and versatile.
    - Links Windows, WIN32, DOS and 32-bit DOS applications. 
    - Supports all of the accepted industry standards: Microsoft COFF, OMF and CodeView. 
    - Capable of linking multiple resource files.

    Resource Editor

    The Stony Brook Resource Editor provides you with a graphical way to create and modify your Windows and WIN32 resources.
    - Edits accelerators, bitmaps, cursors, dialogs, icons, menus (incl. extended menus), and string tables graphically. 
    - Allows the use of symbolic names in for resource identifiers in Modula-2 and C. 
    - Supports the new Windows 95 Common Controls. 
    - Allows you to generate reports on your resources in HTML format for documentation purposes. 
    - Reads and writes RES files directly so that there is no need for a resource compiler. 
    - Allows you to convert your existing Windows resources to WIN32 resources.

    Modula-2 Language Features

    Stony Brook Modula-2 now follows the ISO specification for the language.

    Take a look at some of the interesting features ISO introduced

    - Exceptions are now part of the language with all the safety that they bring to your code. 
    - Support for the complex type. 
    - Constants composed of record and array types. 
    - Multidimensional open array parameters are now allowed. 
    - For loop index variables have become read only to prevent difficulties to find bugs. 
    - Do you find module initialization code useful? Now Modula-2 supports module termination code as well.

    Here are some of the extensions to the language

    - Built in assembler code is now supported. 
    - Dynamic arrays which are open arrays that are not limited to being parameters. 
    - A greater number of warnings allow you to catch those nasty bugs before they bite you. 
    - Support for both UNICODE and ANSI character types. 
    - Constant procedure parameters allow you to explicitly state the intended use of parameters. 
    - The language provides extensions for the use of array slices. An array slice is a subrange of an array which can be used in the same way as a normal array. 
    - The compiler now provides an option to allow code which ignores function returns. This can be very helpful with many of the modern application programming interfaces. 
    - The break and continue extensions to the loop syntax allow you to write cleaner loop code. 
    - A language extension is provided to allow you to declare initialized variables. 
    - The conditional compilation syntax makes building different versions a snap.

    Support for interrupt handling

    - Please note that calls to IOTRANSFER (to be imported from the standard module COROUTINES) and module protection specifications ("priorities") are compiled, although the standard Stony Brook system does not include corresponding run time procedures. However, an implementation is available from TERRA Datentechnik, see also description of TERRA add-on libraries for DOS below. 
    - The DOS compiler supports the specification of the [INTERRUPT] procedure attribute for procedures that shall be installed as interrupt service routines. 

    Logitech Modula-2 V4 Compatible DOS and Win16 Libraries

    The fact, that the Stony Brook system comes with different libraries, made quick adaptation of existing Logitech Modula-2 V4 applications difficult. With the availability of LM2V4 compatible libraries from TERRA Datentechnik these times are gone and the port of existing DOS and Windows 16-bit Logitech Modula-2 V4 applications to Stony Brook Modula-2 V3 has become a snap. These libraries are a most valuable add-on that greatly simplifies migration from Logitech to Stony Brook Modula-2.

    The Logitech V4 compatible library implementations basically include all but a few Logitech library modules. Not included are module "Break", the exception handling modules, and some further modules of the run-time support, which are unlikely to be called directly from application programs.

    The Logitech compatible DOS library supports two implementations of the Modula-2 standard procedure IOTRANSFER (to be imported from the standard module COROUTINES): One according to the ISO standard, and another one that follows the old Wirth/Logitech definition. In addition, the library also provides the other interrupt handling related procedures of module COROUTINES according to the ISO standard (ATTACH, DETACH, etc.), as well as the run time procedures that implement module protection ("priorities").

    Logitech Modula-2 V3 Compatible Library for Building Win32 Console Applications

    A Logitech Modula-2 version 3.40 compatible library for building Windows 32-bit Console Applications is also available from TERRA. This library allows for easy porting of non-graphical (character-output oriented) Logitech Modula-2 V3.40 DOS programs into the 32-bit Windows environment.

    Console Applications are native 32-bit Windows programs that have a main program module like DOS applications. They neither need a message handling main loop, nor to install call-back routines, nor to explicitly initialze and open any windows. Instead, they use a "console" or "Terminal" window, which looks about like a Windows DOS box.


    The Stony Brook Modula-2 development system requires Windows 95 or Windows NT version 3.51 or greater as development platform.


    The Stony Brook Modula-2 Development System Media Package includes the Modula-2 Environment, Compiler, Debugger, Linker, Librarian, Resource Editor, 32-bit Extender, Run Time Library Sources, and documentation.

    The Logitech Modula-2 V4 Compatible DOS and Win16 Libraries, and the Logitech Modula-2 V3 Compatible Library for Win32 Console Applications from TERRA Datentechnik come as add-ons to Stony Brook Modula-2 and are available separately.

    Von Mensch zu Mensch
    Home · Modula-2

     Copyright © TERRA Datentechnik 1996-2006
    Alle Rechte vorbehalten.TERRA Datentechnik übernimmt keine Haftung für die Vollständigkeit, Richtigkeit und Aktualität der Angaben!
    Rechtliche Hinweise  ·  Firmenprofil
    Contact us   Last Updated: 12-November-2002 Webmaster