Compilers Text Editors and IDEs Tutorials Papers Libs Sources Q&A Forums Lists Groups Links Downloads Pictures Guestbook


Recommended Links

GNU Modula-2

Modula-2.org home page

Modula-2.info home page

Excelsior home page


[ top ]  Compilers / Translators

The following binary package requires an installation of Cygwin. The build works with Cygwin32 only. I still have problems building GNU Modula-2 under Cygwin64. Use everything provided here at your own risk.
Binaries of the development branch of GNU Modula-2 for Windows/Cygwin32 (last update tarball 17-September-2015, gm2 grafted onto GCC 4.7.4): You have to download the provided archive to your home folder inside of your Cygwin installation. Extracting the archive creates a folder called opt which contains GNU Modula-2 (that is why the archive is just called opt.zip). After that you have to add the path to the compiler by typing 'export PATH=~/opt/bin:$PATH'. If you run into problems also try to add 'export LD_LIBRARY_PATH=$HOME/opt/lib' to your environment. You should then be able to build Modula-2 programs. Please refer to the GNU Modula-2 documentation to get more details.
And a hint for people not familiar with the Linux/Unix world: Emacs and VIM are available in the Cygwin package directory; both editors come with Modula-2 syntax highlighting. Have fun.
You may also be interested in a generic makefile for GNU Modula-2 written by Duke Normandin. It was posted to the GNU Modula-2 mailing list by the author.
Martin Kalbfuss wrote a M4 macro to detect GM2 as part of his project Schwarzer Kaffee. The file may be helpful for people using the GNU Build System with GM2.
I removed the Linux binaries of GNU Modula-2 which I used to offer here for some time as the compiler is now available as a binary package from the GNU Modula-2 homepage. The files available there are Debian packages which can easily be converted to other formats using e.g. Alien or other converters coming with your favorite distribution.

FST 4.0 Modula-2 compiler with Mide3de2 v1.1: Installer-package for Windows bundling two freeware products. The file is about 1.5MB and offers html-docs and an uninstall-option. Also included are several libraries including an object oriented package similar to the Turbo C++ library and the alternative library for the compiler by Pat Terry. Note: Some users of Windows 2000 and Vista have reported problems, the package is not compatible with Windows 7/8 and will not be updated to be usable with these operating systems. Please note that most Modula-2 compilers from the DOS days can easily be used inside programs emulating their original environment. Try DOSBox for a start.

m2tom3 is a Modula-2 to Modula-3 translator under GPL developed at the university of Aachen in Germany. It might be useful for people migrating their sources to Modula-3. The developers claim the translator produces readable and usable output. I now offer the package from this site as the various download links keep changing or even disappearing. You need a Modula-3 compiler to build the translator. There seem to be some minor problems but there are hints to get you going.

M2Latex is a package to help you in translating and pretty printing Modula-2 sources to LaTex. I hope we can make a version for Linux available as the program was developed for SunOS4 and does not compile on Linux boxes at the moment (Any C-people out there willing to help?).

A kind visitor of comp.lang.modula2 recently (2015) made available an interesting archive. "In 1985/1986, BYTE Magazine ran a series of articles by Jonathan Amsterdam on VM2, a virtual machine written in Modula-2, and then a compiler for this machine." Read more here.

[ top ]  Libraries / Sources

hfilter.zip [8KB]: A high pass filter implemented in Gardens Point Modula-2 by Julian Miglio.

Christian Maurer's "Murus" (short for "Modular Universe") was an impressive and well documented tree of Modula-2 sources under GPL. Dr. Maurer developed the package using the Mocka Modula-2 compiler and described his project as follows: "Murus is a collection of reusable software components, constructed during the last twentyfive years within the academic context of teaching algorithms and data structures, software engineering and project management, nonsequential programming and mathematics at the Department of Mathematics and Computer Science of the Freie Universitšt Berlin." Please be sure to install the Modula-2 compiler version Mocka 0608m to compile the sources. Murus is now develooped in the Go language so I offer a version of Murus from the Modula-2-days here.

mouse.zip [3KB]: A simple mouse-library for Gardens Point Modula-2 written by Julian Miglio (Thanks!). Basic functions with self-explaining names are available: Show_Mouse, Hide_Mouse and Get_Mouse. Also comes with a test-program.

M2LIB [1.4MB] is a huge Modula-2 library for Atari-compilers. It uses a preprocessor so it can be used with most Modula-2 compilers available for the Atari-platform. There are packages for providing POSIX-functions, an ISO-Modula-2 library and much more. This was written by Holger Kleinschmidt who kindly contributed the package. Just in case you are curious: this replaces the package M2POSX14 as this is what evolved from M2POSX.

olsen.tar.gz [1.5MB]: Olsen & Associates Portable Modula-2 Library. Description from README: "The library's foremost feature is its portability. Applications which use the library should be portable (usually w/o modification) and the library definition and current implementation should easily port to other systems. The library was originally centered around I/O, but has been expanded to include those facilities which we found were required for Modula-2 application programming in general." I have to add: portability in this case means portability between the Sun Modula-2 compiler and the Logitech compiler for DOS systems.

TopSpeed Extended Libraries [0.5MB]: This is a package written by Marco van de Voort. XtdLib (eXTenDed LIBraries) are libraries for TopSpeed 3.1x. Description by Marco van de Voort: "The original highlights were a pulldown system on top of module window, and a helpfile system." Not only interesting for owners of TopSpeed Modula-2.

XModula: "This is a set of files that will allow you to use the X-Windows (version 11, revision 6, also known as X11R6) library calls directly with the Modula-2 programming language. It includes the full Modula-2 foreign definition modules for the most important headers of X-Windows: Xlib.h, X.h, Xutil.h and keysyms.h". These files are quite old but still interesting.

MultiGraph library: A graphics library for TopSpeed or StonyBrook Modula-2 by Alex Iakovlev and Dimon Maslov. The readme says this library was offered as shareware. I do not know if this license still applies or if the authors can still be found. Here are the available versions: Graph Library for Stony Brook Modula-2 Ver 2.2, Graph Library for Stony Brook Modula-2 2.2 and TopSpeed Modula-2 1.17, 3.10, Graph Library for TopSpeed Modula-2 Ver 1.17 and Graph Library for TopSpeed Modula-2 Ver 3.10.

The following archives contain miscellaneous sources for FST and TopSpeed Modula-2 (All of the material was published years ago with the magazine "CHIP - Spezial Modula-2").
Misc. sources (1) [100KB]: miscellaneous sources, including how to program a simple editor.
Misc. sources (2) [050KB]: miscellaneous sources.
Misc. sources (3) [080KB]: miscellaneous sources, including searching- and sorting-routines.

There once was a group in Usenet... It was called net.sources. Some files are available from there which I put up here to just keep them available: MakeMake is a program written by Steve Tynor (modified by Gregory Elder and Bob Dukelow) to create makefiles for Modula-2 programs. The archive contains a port of MakeMake to work in the Logitech Modula-2/86 environment.
There also are the remains of OSSI, a standard system interface for Modula-2 programs. More information on OSSI is available from the local Q&A area. The archive provided here contains only the definition modules of the OSSI optional part.

[ top ]  Q&D Tools

Q&D Tools. An impressive package containing various (lots of) useful utilities for the DOS-commandline which are still usable under different Microsoft Windows operating systems. Some but not all sources (Topspeed Modula-2, PowerBasic, Visual Basic) are available. The package is freeware, copyrights by Philippe Guiochon. Please read the enclosed license for details. The package was updated in december 2016. Some programs that are part of the package are now distributed as part of Ultimate Boot CD.
The following programs are part of the complete Q&D Tools package but were ported by the author to the Win32 platform using XDS Modula-2. Please note most of the DOS versions have more options, are better and cleaner and have been tested for years, while these ports have not. Sources are included, please keep in mind there is a license.
concat_win32.zip is a port of the DOS program concat. This program appends specified file(s) to a mainfile.
crlf_win32.zip is a port of the DOS program crlf. "This program performs various operations related to CR ($0d) and LF ($0a)."
cs_win32.zip is a port of the DOS program cs (CheckSum): "This program computes checksums (syntax 1), verifies checksums (syntax 2), compares two logs (syntax 3), or rebuilds data for each log entry (syntax 4)."
dt_win32.zip is a port of the DOS program dt. "This program prints current or filename date and time. Date format can be user-specified. Discordian calendar is supported."
fcomp_win32.zip is a port of the DOS program fcomp which is a binary/text file compare utility.
mod2htm_win32.zip is a port of the DOS program mod2htm. As the name says the programs function is to create HTML code from your Modula-2 source files. Notes by the author: "Here is a quick port of MOD2HTM to Win32 platform using XDS TopSpeed Compatibility Kit (XDS 2.6 beta2). As show by conversion tests launched on dozens of files, it seems to work. Note this Win32 version expects sources to use Windows OEM character set."
paspeek_win32.zip is a port of the DOS program paspeek. This is a Pascal strings finder used to extract PASCAL counted strings found within a given range within a file.
peek_win32.zip is a port of the DOS program peek. This program tries and extracts strings from file(s).
quizyn_win32.zip is a port of the DOS program quizyn. This is a computerized Yes/No quiz.
textgen_win32.zip is a port of the DOS program textgen. Q&D Text Generator is a program "which might be both funny as a random generator (see enclosed scripts for both DOS and Win32 versions) and useful as a password generator (many examples are given in the DOS archive found in QDTOOLS)."
xtract_win32.zip is a port of the DOS program xtract which is a File Data Extractor - have a look.

[ top ]  Documents

For printing and reworking I provide a nice PDF (Portable Document Format) as well as an ODT (Open Document Format) version of the freely available Coronado Enterprises Modula-2 tutorial. The examples are also available to have everything available from here. Keep in mind there is another version of the tutorial available at modula2.org which is adapted to newer compilers such as ADW and XDS Modula-2. Find more information in the tutorials and papers section.

FST-debug.zip [2KB]: This document by Julian Miglio describes howto debug programs compiled with FST Modula-2 using the Turbo Debugger made by Borland. An example is contained in the archive.
MODULA-2 -- A Language For The 80's [8KB]: This is an old paper giving a short overview of Modula-2. I think the text is still usable for beginners and Pascal-programmers.
HTML documentation for FST Modula-2 [46KB]: Makes life easier, especially for beginners using Fitted Soft Modula-2. Simply converted to HTML, it's the original doc by Roger Carvalho.
Modula-2 to Oberon [12KB]: This file is a tech report from ETH Zurich written by Nicklaus Wirth. It can be freely distributed as long as it isn't modified in any way and notice is included stating that it isn't to be modified. Some interesting facts about Modula-2 (what is not so good about it etc.).
Structure of Modula-2 programs [41KB]: description and introduction to Modula-2 on 50 pages of text in rtf-format. Found it somewhere on the net. I didn't modify it, should I be violating anyones copyright, email me and I'll remove it.
Gardens Point Modula-2 Library Reference: Useful when getting used to the libraries of the compiler. I created this a long time ago, maybe it is still useful for someone (This documentation is for the Linux-version but I think it's quite "portable").
M2F Modula-2 Library Reference: Similar to the package above this can be useful to people new to the compiler.

Information on ISO Modula-2 is rare. That's why I offer 3 articles that are also available via FTP. The articles give a little background information on ISO Modula-2 and help to understand the differences between PIM and ISO. I also converted the original documents to pdf - the result doesn't look that good in Acrobat Reader but if you print the files the output looks good again (Seems to be a problem of Ghostscript which I used for the conversion).
(1) [pdf] [ps] ISO/IEC 10514-1, the standard for Modula-2: Process Aspects
(2) [pdf] [ps] ISO/IEC 10514-1, the standard for Modula-2: Changes, Clarifications and Additions
(3) [pdf] [ps] Standardized Extensions to Modula-2

[ top ]  Bash Scripts for Vim

The following are simple and short bash scripts which I use to save time when working with GNU Modula-2 and Vim (Debian and Cygwin). Most of the scripts just accept one parameter, that is a module name without file extension. The scripts have to be made executable and work in the current directory.
nm (new module): provided with a module name it creates both a basic definition and implementation Modula-2 file in the current directory and opens both files in Vim using the split window feature of the editor. You can edit the file to have vertical or horizontal splitting.
om (open module): is a script used to open both parts (definition and implementation) of an existing module in Vim side by side. Just call it with the modules name.
ml (module and library): a script to open the given module in the left window of the split Vim screen and the file explorer with the wanted library in the right window. Depending on your installation you may have to apply the correct path to the gm2 libraries you wish to browse.
op (open project): this script doesn't need any command line option. After entering a projects directory you can use it to open the Makefile and a file explorer of the current directory.

[ top ]  Miscellaneous Files

SynEdit 2.4 is an editor written by Matthew Inman. The program has nothing to do with 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. The original website mkidesign.com is no longer available and it gets harder and harder to find a copy of the program - so here it is.

GPM Total: A nice IDE for the DOS-version of Gardens Point Modula-2. The package disappeared from the net so I offer it here. This is a classic Borland Turbo Vision application coming with a simple installation program.

Syntax highlighting files for Notepad++, a free editor based on Scintilla.

Modula-2 API definition for Notepad++ v.5.0.3. "The modula2.xml is a work in progress; actually it contains "all" PROCEDURE of the DEFinitions module of XDS environment. I tried to avoid duplication of the ANSI/UNICODE procedure." Some explanations are available. Daniele Marangoni sent all the files for Notepad++ in. Thanks a lot. Please note: Notepad++ uses Scintilla as its basic editing component as do CodeLite and Code::Blocks (both are "full featured" IDEs). You may want to try the files provided here with these Integrated Development Environments. Should work. Please report back -

ISO Modula-2 syntax-highlighting for Vim (tested v6.2). Language: 10514-1: 1996, Modula-2, Base Language.

ISO Modula-2 syntax-highlighting file for the ConText editor. Just copy the file to subdirectory 'highlighters' of your ConText installation. Language: 10514-1: 1996, Modula-2, Base Language.

ISO Modula-2 syntax highlighting for U. Meybohms Proton. Howto use the file: (1) Copy the downloaded file to subdirectory 'syntaxschemes' of your Proton-installation, (2) edit the file 'extensions.ini' in the same directory. The necessary change may vary depending on the compiler in use! Be careful to avoid double-binding a file-extension. Language: 10514-1: 1996, Modula-2, Base Language.

The growing list of editors providing Modula-2 syntax highlighting can be found here.

Here's a spinning Modula-2 logo I created for an older pagelayout. Feel free to use it for your own page. It's background is transparent, but it looks better on dark colors...


One more: An animated button for your homepage featuring Dexter from Dexter's Lab. To be used if Modula-2 did something for your page (for example the CGI-programs are written in Modula-2 or a Modula-2 program does automatic HTML-creation for you and so on).

Powered by Modula-2

Get more information


IRC Modula-2 Chat

Modula-2 at Wikipedia.org

Modula-2 Webring
[ List all | Random | Join ]
[ Prev | Next ]



Contact, suggestions, submission of news items: contact information