Installing a Modula-2 Environment
[ top ] Microsoft Dos / Windows
-
Working with Windows (win95+), you have one "real" choice - that is using the XDS-environment
by Excelsior. They describe their product as follows: "Native XDS-x86 is the most advanced optimizing ISO Modula-2 and Oberon-2 compiler for Intel x86 based platforms available on the market. It allows you to freely mix those languages, access the operating system API, and use third-party C libraries". Well, this for sure is the most mature product which also comes with great documentation and a useful set of libraries. I could not find a better system. Visit Excelsior for details about their products. Since Stonybrook Modula-2 has left the scene the XDS package is even more important as it is now the only free ISO Modula-2 compiler available. Setting up the compiler environment is easy - just download the file and execute it, it's a usual install-shield application. A Modula-2 to C translator is also available as is a Topspeed compatibility pack.
-
For those familiar to Linux or other Unix-like environments GNU Modula-2 is a possibility. Using the Cygwin environment you can use the whole GNU toolchain. To get a nice IDE you may want to install Eclipse and Modulipse.
-
Another way to somehow "comfortably" use Modula-2 with Windows:
Download the free FST 4.0 compiler (and the LHA utility to unpack the file - I assume you know howto) and the Windows-IDE for the compiler. copy the IDE-executable to FST's bin-directory and set it up: first goto options->environment and set the appropriate paths to your FST-installation. the program saves your settings to a file called "modula.ini". you are ready to go - Load one of the example-files from the 'exa'-directory, compile and link it - but DO NOT RUN the program! Most of the examples will produce a first-class bluescreen when executed (due to not allowed system-calls). When running Windows just use them for testing the environment. Alternatively you may want to download my local installer-package wich will install the compiler, the IDE and some simple HTML-documentation. An example of how to use Borland's Turbo Debugger with FST (by Julian Miglio) is also included.
Do you speak Spanish? Then you may also want to have a look at www.idemodula2.freeservers.com - there you can find another Windows-IDE for FST. It's only available in Spanish.
-
If you want to use GPM (The compiler produces very small executables and is ideal for programming commandline-tools or CGI), you may want to use the package in combination with some good and free editor. I use Ulli Meybohm's Proton-Editor when bound to a MS operating system. It's really fast. You can start gpmake (the one-step-build-utility from GPM) after defining a shortcut for it ("shortcuts" in main-menu). The editor offers lots of functionality and is highly configurable. Also offers fast modula-2 syntax-highlighting (an ISO-Modula-2 language file is available from the download-area).
For people using plain DOS-environments: Best editor with IDE-functionality for all DOS-based Modula-2 compilers is Set's Editor. the editor is also available for Linux and gives you a standardized environment e.g. for the Gardens Point Compiler under different operating systems. Great program!!
Like Set's Editor GPM Total is a DOS-IDE especially made for Gardens Point Modula-2. A fast Turbo-Vision-like Editor with Error-Redirection makes the thing quite usable, but the IDE lacks a few things I really would like to see, e.g. it does not offer syntax-highlighting.
[ top ] FreeBSD NetBSD and OpenBSD
- FreeBSD:
Current FreeBSD stable releases do not provide pre-packaged Modula-2 compilers. There also is no compiler in the ports collection (exception: the translator p2c). You'll have to download software manually:
- NetBSD:
If you want to compile something under a BSD-system do not forget to install GNU Make (check if it is already installed by typing "gmake")! As NetBSD comes with support for Linux binaries, you may want to use XDS Modula-2 (debugging problems!). I tried to build GNU Modula-2 a few weeks ago - it builds and works fine.
- OpenBSD:
No installation here... Sorry.
I am using Slackware for some time now, so I can only tell you what's possible here - maybe there are differences between the distributions - there shouldn't be too many... I built M2F without problems, also GNU Modula-2 compiles fine.
Excelsior/XDS released its Modula-2/Oberon-2 development system for free but there is no debugger. While M2f really is a good PIM-compiler (only few libs...), the XDS-package comes with a full set of PIM and ISO modules, modules for accessing Xlib and POSIX-functions. GNU Modula-2 now supports the ULM libraries and will support Logitech and ISO libs in the future, so this seems to be the Modula-2 future.
I also used a combination of gVIM and GPM. I've played with the X11 interface of GPM and I was impressed. I moved away back then because the compiler was not fully ISO-compliant and I wanted to use the complete ISO Modula-2 (especially user defined exceptions).
[ top ] Free Editors with M-2 Highlighting
- Vim: vi improved - love it or hate it. It's half a day of learning the basics (and that's four hours of real learning), after this you'll know if you like the program. I use a version called gvim to edit this page.
- Emacs: I did never get used to it. Some say it's the best, some hate it (just because they never learned to use it?).
- Kate, the KDE Advanced Text Editor provides Modula-2 syntax highlighting. The syntax-scheme may easily be modified as each language is defined in a simple XML-file. Some people may have to fetch the Modula-2 file from the homepage.
- Notepad++ "is a free (free as in "free speech", but also as in "free beer") source code editor and Notepad replacement, which supports several programming languages, running under the MS Windows environment. This project, based on the Scintilla edit component (a very powerful editor component), written in C++ with pure win32 api and STL (that ensures the higher execution speed and smaller size of the program), is under the GPL Licence." Syntax highlighting files for the editor are available from the download-area
- PSPad: An editor which can easily be adapted to new programming languages. It comes with a file for Modula-2. Never used it but looks promising. A kind visitor of my Modula-2 pages also pointed out: "It makes a nice combination with the XDS IDE as each is 'aware' of when a file has been modified and asks if you want to reload it."
- Proton: editor by Uli Meybohm - a very good and easy to use editor.
- ConText: powerful editor for programmers (win32). You'll have to download the editor from the site given above, then fetch the Modula-2 syntax-file from the local download-area.
- Fame (by Florian Wolff) is a nice editor wich can be extended via the script-language Lua. Also offers a simple project-management. GNU License.
- SynEdit is now available from the local download-area. The editor by Matthew Inman (MKI Design) is NOT the "multi-line edit control for Borland Delphi and C++Builder" wich you can find at SourceForge.net (wich is common for SynEdit now). It is a complete and free editor with lots of functions wich is no longer developed. It's got problems (really slow) with really big files (0.5MB+), but it's usable for good modularized projects.
- Set's Editor: Linux and Windows. Lots of options and highly configurable. Like the Borland-Turbo-Vision look-and-feel.