M2F

What is M2F?
FAQ
Licence and Availability
Download
Details
Building m2f yourself
Changes in the latest release
Reporting bugs

What is M2F?

M2F is a complete Modula-2 compiler for GNU/Linux which obeys the 2nd Edition Programming in Modula-2 by N. Wirth. It generates code for the 8086 and 80?86 families and the is32 abstract machine. In particular it can generate pipelined Pentium code with detailed timing calculations presented in comments in the assembly language. It will bootstrap itself using a modified version of p2c 1.20 (which comes with the source distribution). M2F generates GDB debugging information and error messages are emacs compatible.

FAQ

m2f-faq

Licence and Availability

M2F is covered by the GNU CopyLeft license version 2. Source code and binaries are available in tar.gz, rpm srpm and deb format.

Download

m2f-4.3.1.tar.gz

Details

M2F manual page
Release notes

Building m2f yourself

Note m2f can only be built on a 32 bit x86 machine. Download the sources, say, m2f-4.3.1.tar.gz and type:

tar zxf m2f-4.3.1.tar.gz
cd m2f-4.3.1
make all
sudo make install

and go and have a coffee or curry depending on your machines speed.

Changes in the latest release

Fixed an atan bug and introduced EXPORT UNQUALIFIED to allow user to create definition modules for foreign language libraries. This enables users to interface to C libraries without having to write wrapper libraries. See libm.def for a brief example.

Finally added syntax error recovery. The ASM syntax has changed to the GNU syntax. Note that not all the GNU options are implemented, floating point operands to ASM statements are not supported.

Reporting bugs

Please email gaius@glam.ac.uk with any bug reports, suggestions and grumbles.