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.net home page

Libraries and Sources

Also have a look in the download section. The stuff hosted locally is not included in the following collection of links.

[ top ]  Miscellaneous Sources

A growing number of Modula-2 projects is available over at GitHub.com.
The Sources Store for Modula-2 and Oberon-2 Programming Languages: description from homepage: "The purpose of this site is free propagation of any source code and documents related to Modula-2 and Oberon-2." They have quite interesting material available in the download-section, I think especially the work of Victor V. Sergeyev is interesting if you are using the XDS-compiler: have a look at a complete winsock- and ODBC-interface!
Modula2.org offers some very interesting packages (especially for Windows-users of XDS or StonyBrook Modula-2) in the projects area.
PMOS by Peter Moylan: description from homepage: "PMOS is a large library of Modula-2 modules, distributed in source form. Its primary purpose is to make it easy to write multitasking programs for real-time and/or embedded applications. However it also contains a number of modules of interest even if you don't want to write multitasking code: screen windows and screen graphics modules, various device drivers, and a variety of utility modules. PMOS is free for non-profit use."
Also from Peter Moylan: Modula-2 Numerical Analysis Software. Some good functionality if you need basic routines for doing e.g. statistics. The directory contains other sources like fragments written for the NetM2 project, modules for playing music via the PC-speaker (who remembers what that is?) and so on. The modules were mostly written for DOS compilers.
And once again a program written by Peter Moylan: Web Family Tree is a freeware program that permits you to display your family tree in a web browser. It is a Modula-2 program using the common gateway interface. The source code is available.
TeaTime/2 v0.06: A file encrypter/decrypter based on the XTea cipher including Modula-2 source. TeaTime/2 was compiled using the Mill Hill & Canterbury Modula-2 compiler for OS/2.
ftp://ftp.psg.com/pub/modula-2/: A real modula-2 treasury! A FTP-Server kindly hosted by Mr. Bush. There are source code modules for Sets and Lists, compilers, example code and lots of packages and useful things. Have a look.
There are quite a lot of interesting Sources available from Jan Verhoeven's Modula-2 Pages. There are a lot of projects for Dos (FST) and Linux (Mocka) compilers there, so just have a look. I think especially the examples for low-level interaction of Modula-2 programs with some piece of hardware teach an interesting lesson. Most of the projects are distributed under the GPL. For example VGA lib 3: description from homepage: "VGALIB3 is a library for the FST (Fitted Software Tools) Modula-2 compiler, to work with VGA mode 12h (640 x 480 x 16). The library has routines for plotting, drawing lines, making boxes, writing to screen of text and CARDINALs and more. It consists of a DEF file, an M2O file, and a MOD file with FULL SOURCES. All critical routines are in inline ASM. VGALIB is FREE SOFTWARE as defined in the GNU General Public License."
Schwarzer Kaffee, a SDL wrapper for the GNU Modula-2 compiler.
xds-gtk2, a Modula-2 GTK+ binding for XDS Modula-2/Oberon-2.
M2Collections, Modula-2 collections library. The library provides an API for collection ADTs, in particular: stacks, queues, double ended queues, priority queues, balanced binary search trees, patricia tries, dynamic arrays and hash tables to store arbitrary data.
M2Regex, Regular expression library for Modula-2.
M2Curses, Modula-2 bindings for the curses screen management library.
RAMSES (Research Aids for Modeling and Simulation of Environment Systems) "is a generic programing, modeling, and simulation environment that allows you to solve a wide range of problems easily (Fischlin 1991). You can program or model and interactively solve non-linear differential equations, difference equations, and discrete event systems in any combination; size and complexity of your model is only limited by your computer's resources. RAMSES is based on the Modula-2 programing language (Wirth 1985, 1988) that supports the writing of simple, compact, well-readable, type-safe, modular and easily reusable programs that execute at high speed". Extensive documentation is available. You will need Stonybrook (Windows), p1 (Mac OS X) or EPC Modula-2 to use RAMSES with other operating systems than classic Mac OS (For the latter there is the free MacMETH Modula-2 which you can fetch from here).
John Andrea's libraries and example code: quite a lot of reusable code, some really interesting things (for example a module for handling .bmp graphics).
Francesco Sblendorio wrote mod-xterm-cpm (XTerm for CP/M) using Turbo Modula-2 under CP/M on a Commodore 128. "Cross-Terminal is a Modula-2 module for CP/M. Handles different kinds of terminals (VT100, ANSI, ADM-31, KayPro, C128) for easy cursor positioning, colors (when available), and screen handling." The same author wrote Gorilla.BAS - CP/M version, a port of GORILLA.BAS to CP/M written also in Turbo Modula-2. "This is a Modula-2 (despite the name) implementation for CP/M of the classic GORILLA.BAS BASIC game included in MS-DOS 5.0."
MAS: The "The Modula-2 Algebra System", description from homepage: "MAS (Modula-2 Algebra System) is an experimental computer algebra system, developed at the University of Passau. MAS combines imperative programming facilities with algebraic specification capabilities for design and study of algebraic algorithms. It contains a large library of implemented Groebner basis algorithms for nearly all algebraic structures where such methods exist. MAS further includes algorithms for real quantifier elimination, parametric real root counting, and for computing in (noncommutative) polynomial rings." As the original homepage at university of Passau disappeared, I am now linking to the university of Mannheim (Download MAS). Here is another link to MAS on GitHub.
Also available on GitHub: The Software Component Library by Charles Lins which was quite known in the Modula-2 community a long time ago. The source code provided was published with three books teaching Modula-2. A short description: "Charles Lins collection of reusable standard software components, could be the basis for every programmers software project in Modula-2. Components that are implementations of commonly used data structures are presented, along with an adequate description of their functionality and efficiency."
Page Six is a service bot for IRC channels. Note from the developer: "Note that this bot isn't really meant for general distribution. However, feel free to view the source or contribute, if you feel the urge and want to play around with a Modula-2 project." In my opinion a very interesting project demonstrating the use of sockets with Modula-2. The bot is used in the Modula-2 IRC channel (a link to this channel can be found in the right column of this page)." The package cannot be compiled as some modules are missing but the idea of howto program sockets and the internet can be well learned from the files contained.
Rosetta Code "is a programming chrestomathy site. The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another". A lot of classic problems and their solutions are already there. The link points to the Modula-2 section which is growing steadily. Contributions are welcome.
Modula2 Chess: A chess game for Linux written in Modula2. From the homepage: "This is an example of how you can use the Modula2 language to write more interesting programs than 'hello world'." The program was developed using the Mocka compiler. It was written by Javier Callón Álvarez.
OS/2 Modula-2 example source code developed for the Mill Hill & Canterbury Modula-2 compiler for OS/2 (written by Juergen Neuhoff).
VUB Parallel Computing Laboratory: various modula-2 sources including 3 demo-games with complete sourcecode for XDS Modula-2. Have a look at their Modula-2 technology page! Beside of other interesting projects they provide Wimdows, a library written by Wim Devesse. Using it you can write Windows applications that take advantage of the graphics capabilities of Windows in an easy way for beginning programmers. It is focused on creating simple games and is used at Vrije Universiteit Brussel by participants of Practicum Structured Programming Modula-2. The main components of Wimdows are: Graphics functions for drawing geometric figures (lines, rectangles, circles, polygons, ...), working with bitmaps, control of the mouse and keyboard, menus, buttons and text boxes. The library was written for use with the XDS Modula-2 compiler.
David Egan Evans published some code related to Brian Kernighan's Software Tools. Some of the sources are Modula-2. Have a look in the subdirectories. This is copyrighted material. The author writes: "It is my belief that Modula-2 is a better Pascal, and Oberon is a more advanced and simpler Modula-2. Ultimately, it is my intention to carry on the development of these tools in Modula-2 and Oberon, but provide programs that can be used to work with the books."
User rbielak published "some very old code I wrote on the Amiga. Mostly in Modula-2". Seems to be a demo from the old days.
HPF - DT High Performance File Format high speed decoding library for Modula-2 called m2hpf. "This library is made to provide quick data access, to be used in real-time signal processing project, so for example; using this library to implement a HPF to CSV file converter will be much more efficient than using the Delsys File Utility." Written using the ISO Modula-2 library.
Presumably a college project implementing quicksort and linked lists written for the GNU Modula-2 compiler.
Results of a programming course at the University of Malaga: "This page contains a selection of computer games developed by the students of Practical Programming. [...] All the games were implemented by using the imperative programming language Modula-2 and the environment Top-Speed that works under DOS operative system." Source code for most of the games is available.
A lot of interesting sources, pieces of code and algorithms written in Modula-2 are available from the archives of AMOK, a Modula-2 and Oberon club for users of the Amiga computers. A lot of the available files are not platform dependent (here is a list of contained things). You need a program able to unpack LHA archives, for example 7-Zip.
In the DOS-days Guido Hoss wrote KeyDex "an information retrieval system for MS-DOS with a text-mode UI and menu system". The author released his work under GPL in 2016.
Pat Terry wrote an alternative library for FST Modula-2 wich extends the original libs coming with the compiler. Download via ftp: definition modules and object modules.
Taak326b.zip: developed by K.H.M. de Jonge and J.H.D. Keukelaar. A library making use of the OO-extensions of newer versions of the FST-compiler. "Modeled after the Turbo C++ Class Library Definition from Borland International (1990).
m2ticker.zip is an archive I found long ago searching the net. It contains a file for FST Modula-2 called PIT.MOD written by G.S.Vigneault that provides Turbo Pascal like Sound and Delay routines. These routines make heavy use of inline assembly so are strictly tied to MS-DOS systems.
The Vector Board: Modula-2 sources for different compilers and systems (Turbo Modula-2, Atari ST, CP/M). Here's the list of available files. They also still offer version 1.0 of FST Modula-2!
Mr. Kim Moser's site contains some older Modula-2 sources (written for the Logitech compiler) published under the GPL.
Chris Rathman wrote Modula-2 code demonstrating OO Shapes. These are attempts to do Object Oriented Programming in a non-OO language.
Gregory S. Vigneault: A short piece of code called Quine, it's a so called "self-reproducing program". See versions in other languages at the Quine Page.

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: modula2 at christophschlegel.at