Content deleted Content added
→Current compilers: Add ObjModula2 |
GreenC bot (talk | contribs) Move 1 url. Wayback Medic 2.5 per WP:URLREQ#citeftp |
||
(364 intermediate revisions by more than 100 users not shown) | |||
Line 1:
{{Short description|1970s-80s computer programming language}}
{{
{{Infobox programming language
| name
| logo
|
|
|
| designer = [[Niklaus Wirth]]
| typing = [[Static type|Static]], [[Strong and weak typing|strong]], [[Type system#Type safety and memory safety|safe]]
| scope = [[Scope (computer science)|Lexical]] (static)
| platform = [[Lilith (computer)|Lilith]] ([[Advanced Micro Devices|AMD]] [[AMD Am2900|2901]])
| operating system = [[Cross-platform]]
| license =
| file ext = .mod, .m2, .def, .MOD, .DEF, .mi, .md
| website = {{URL|www.modula2.org}}
| implementations = [https://www.sysecol2.ethz.ch/RAMSES/MacMETH.html ETH compiler] written by Niklaus Wirth<br/>[https://www.nongnu.org/gm2/homepage.html GNU Modula-2]<br/>[https://www.modula2.org/ ADW Modula-2]
| dialects = PIM2, PIM3, PIM4, ISO
| influenced by = [[Modula]], [[Mesa (programming language)|Mesa]], [[Pascal (programming language)|Pascal]], [[ALGOL W]], [[Euclid (programming language)|Euclid]]
| influenced = [[Modula-2+]], [[Modula-3]], [[Oberon (programming language)|Oberon]], [[Ada (programming language)|Ada]], [[Fortran 90]], [[Lua (programming language)|Lua]], [[Seed7]], [[Zonnon]], Modula-GM
}}
'''Modula-2''' is a structured, procedural [[programming language]] developed between 1977 and 1985/8 by [[Niklaus Wirth]] at [[ETH Zurich]]. It was created as the language for the [[operating system]] and [[application software]] of the [[Lilith (computer)|Lilith]] personal [[workstation]].<ref>{{Cite web |url=https://www.inf.ethz.ch/personal/wirth/projects.html |title=Summary of Projects by N. Wirth, 1962–1999 |author=<!-- Unstated --> |date=<!-- Undated --> |website=Department of Computer Science |publisher=[[ETH Zurich]]}}</ref> It was later used for programming outside the context of the [[Lilith (computer)|Lilith]].
Wirth viewed Modula-2 as a successor to his earlier programming languages [[Pascal (programming language)|Pascal]] and [[Modula]].<ref>{{cite book |last=Wirth |first=Niklaus |author-link=Niklaus Wirth |chapter=Pascal and its Successors |date=2002 |editor1-last=Broy |editor1-first=Manfred |editor2-last=Denert |editor2-first=Ernst |title=Software Pioneers: Contributions to Software Engineering |___location=Berlin, Heidelberg |publisher=[[Springer-Verlag]] |pages=108–120 |doi=10.1007/978-3-642-59412-0 |isbn=978-3-642-59412-0 |s2cid=2698265}}</ref><ref>{{cite magazine |last=Wirth |first=Niklaus |author-link=Niklaus Wirth |date=18 February 2005 |title=History and Goals of Modula-2 |url=https://www.drdobbs.com/open-source/history-and-goals-of-modula-2/223000094 |magazine=[[Dr. Dobb's Journal]] |publisher=Informa PLC}}</ref> The main concepts are:
# The [[Modular programming|module]] as a compiling unit for separate compiling
# The [[coroutine]] as the basic building block for concurrent processes
# Types and procedures that allow access to machine-specific data
The language design was influenced by the [[Mesa (programming language)|Mesa]] language and the [[Xerox Alto]], both from [[Xerox PARC]], that Wirth saw during his 1976 [[sabbatical]] year there.<ref name="PIM">{{cite book |last=Wirth |first=Niklaus |author-link=Niklaus Wirth |title=Programming in Modula-2 |year=1988 |___location=Berlin, Heidelberg |publisher=Springer |edition=4th |isbn=978-3-642-83565-0 |doi=10.1007/978-3-642-83565-0 |s2cid=41899609}} Page 4.</ref> The computer magazine ''[[Byte (magazine)|Byte]]'' devoted the August 1984 issue to the language and its surrounding environment.<ref>{{cite magazine |last1=Wirth |first1=Niklaus |author1-link=Niklaus Wirth |last2=Gutknecht |first2=Jürg |author2-link=Jürg Gutknecht |last3=Ohran |first3=Richard |last4=Paul |first4=Robert J. |last5=Coar |first5=David<!-- Do not link to US Judge --> |date=August 1984 |title=Theme: Modula-2 |magazine=[[Byte (magazine)|Byte: The Small Systems Journal]] |volume=9 |number=8 |pages=143–232 |url=https://archive.org/details/byte-magazine-1984-08}} Available at Archive.org</ref>
Wirth created the [[Oberon (programming language)|Oberon]] series of languages as the successor to Modula-2, while others (particularly at [[Digital Equipment Corporation]] and [[Acorn Computers]], later [[Olivetti]]) developed Modula-2 into [[Modula-2+]] and later [[Modula-3]].
== Description ==
Modula-2 is a general purpose [[procedural language]] suitable for both [[systems programming]] and applications programming. The syntax is based on Wirth's earlier language, [[Pascal (programming language)|Pascal]], with some elements and syntactic ambiguities removed. The ''module'' concept, designed to support separate compilation and data abstraction; and direct language support for [[multiprogramming]] were added.
The language allows the use of [[one-pass compiler]]s. Such a [[compiler]] by Gutknecht and Wirth was about four times faster than earlier [[multi-pass compiler]]s.<ref>{{cite web |last=Wirth |first=Niklaus |author-link=Niklaus Wirth |date=1 May 1984 |title=A Single-pass Modula-2 Compiler for Lilith |url=https://www.astrobe.com/Modula2/M2SinglePass.pdf |website=CFB Software |access-date=23 November 2023}}</ref>
Here is an example of the source code for the "Hello world" program:
<syntaxhighlight lang="modula2">
MODULE Hello;
FROM STextIO IMPORT WriteString;
BEGIN
WriteString("Hello World!")
END Hello.
</syntaxhighlight>
A Modula-2 ''module'' may be used to encapsulate a set of related subprograms and data structures, and restrict their visibility from other parts of the program.<ref name="FOLDOC">{{FOLDOC|Modula-2}}</ref> Modula-2 programs are composed of modules, each of which is made up of two parts: a ''definition module'', the interface portion, which contains only those parts of the subsystem that are ''exported'' (visible to other modules), and an ''implementation module'', which contains the working code that is internal to the module.
The language has strict [[Scope (computer science)|scope]] control. Except for standard identifiers, no [[Object (computer science)|object]] from the outside is visible inside a module unless explicitly imported; no internal module object is visible from the outside unless explicitly exported.
Suppose module M1 exports objects a, b, c, and P by enumerating its identifiers in an explicit export list
<syntaxhighlight lang="modula2">
DEFINITION MODULE M1;
EXPORT QUALIFIED a, b, c, P;
...
</syntaxhighlight>
Then the objects a, b, c, and P from module M1
Suppose module M2 contains the following IMPORT declaration
<syntaxhighlight lang="modula2">
MODULE M2;
IMPORT M1;
...
</syntaxhighlight>
Then this means that the objects exported by module M1 to the
<syntaxhighlight lang="modula2">
...
M1.a := 0;
M1.c := M1.P ...
</syntaxhighlight>
Qualified export avoids name clashes
<syntaxhighlight lang="modula2">
MODULE M4;
FROM M1 IMPORT a, b, c, P;
</syntaxhighlight>
<syntaxhighlight lang="modula2">
...
a := 0;
c := P ...
</syntaxhighlight>
This
The language provides for
== Dialects ==
There are two major dialects of Modula-2. The first is ''PIM'', named for the book ''Programming in Modula-2'' by Niklaus Wirth.<ref name="PIM"/> There were three major editions of PIM: the second, third (corrected), and fourth. Each describes slight variants of the language. The second major dialect is ''ISO'', named for the standardization effort by the [[International Organization for Standardization]]. Here are a few of the differences among them.
* ''PIM2'' (1983)
** Required explicit <code>EXPORT</code> clause in definition modules.
** Function <code>SIZE</code> needs to be imported from module <code>SYSTEM</code>
* ''PIM3'' (1985)
** Removed the <code>EXPORT</code> clause from definition modules following the observation that everything within a definition module defines the interface to that module, hence the <code>EXPORT</code> clause was redundant.
** Function <code>SIZE</code> is pervasive (visible in any scope without import)
* ''PIM4'' (1988)
** Specified the behaviour of the <code>MOD</code> operator when the operands are negative.
** Required all <code>ARRAY OF CHAR</code> strings to be terminated by ASCII NUL, even if the string fits exactly into its array.
* ''ISO'' (1996, 1998)
** ISO Modula-2 resolved most of the ambiguities in PIM Modula-2. It added the data types <code>COMPLEX</code> and <code>LONGCOMPLEX</code>, exceptions, module termination (<code>FINALLY</code> clause) and a complete standard [[input/output]] (I/O) [[Library (computing)|library]]. There are many minor differences and clarifications.<ref>ISO/IEC 10514-1:1996</ref>
== Supersets ==
There are several supersets of Modula-2 with language extensions for specific application domains:
* '''
** [https://web.archive.org/web/20010809233821/http://www.mhccorp.com/modula-2.html Canterbury Modula-2], extended with Oberon-like extensible records [This has been withdrawn and is no longer available anywhere]
** [[Modula-2+]], extended with preemptive threads and exceptions
** [https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.7784 Modula-2*], parallel extension<ref>Tichy et al., Modula-2*: An Extension for Modula-2 for highly parallel portable programs, [[University of Karlsruhe]] [1990]</ref>
** [https://robotics.ee.uwa.edu.au/modula-p/ Modula-P], another parallel extension<ref>Bräunl, Parallel Programming, Prentice-Hall [1993]</ref>
** Modula–Prolog, adds a [[Prolog]] layer<ref>{{Cite journal |last1=Muller |first1=C. |date=November 1986 |title=Modula–Prolog: A Software Development |journal=IEEE Software |volume=3 |issue=6 |pages=39–45} |doi=10.1109/MS.1986.229475 |s2cid=763425}}</ref>
** Modula/R, adds [[relational database]] extensions
** Modula-GM, adds [[embedded system]] extensions
* '''ISO supersets'''
** ISO10514-2, adds an [[object-oriented programming]] layer<ref name="freepages.modula2.org">[https://freepages.modula2.org/m2faq.html modula2.org, 5. Where can I get information about ISO Modula-2?]</ref>
** ISO10514-3, adds a [[generic programming]] (generics) layer<ref name="freepages.modula2.org"/>
* '''IEC supersets'''
** [https://web.archive.org/web/20081021043956/http://www.designtools.co.nz/mod51.htm Mod51], extended with [[IEC 1131]] constructs for embedded development
== Derivatives ==
There are several derivative languages that resemble Modula-2 very closely but are new languages in their own right. Most are different languages with different purposes and with strengths and weaknesses of their own:
* [[Modula-3]], developed by a team of ex-Xerox employees who had moved to DEC and Olivetti<ref>Cardelli et al., ''Modula-3 Report'', Research Report 31, Systems Research Center, Digital Equipment Corporation, [1988]</ref>
* [[Oberon (programming language)|Oberon]], developed at [[ETH Zurich]] Zürich for [[Oberon operating system|System Oberon]]<ref>N. Wirth & J. Gutknecht, Project Oberon: the design of an operating system and compiler, {{ISBN|0-201-54428-8}}, [[Addison-Wesley]] [1992]</ref> [https://inf.ethz.ch/personal/wirth/ProjectOberon1992.pdf available online].
* [[Oberon-2]], Oberon with object-oriented (OO) extensions<ref>Moessenboeck & Wirth, ''The Programming Language Oberon-2'', ETH Zurich [1995]</ref>
* [[Active Oberon]], another OO [[Oberon (programming language)|Oberon]] extension, developed at [[ETH Zurich]] with the main goal to support [[parallel computing]] programming on [[multiprocessing]] and [[multi-core processor]]s
* Parallaxis, a language for machine-independent data-parallel programming<ref>Thomas Bräunl, Parallaxis, a Language for Structured Data-parallel Programming, [[University of Stuttgart]] [1996]</ref>
* Umbriel, developed by Pat Terry as a teaching language<ref>Pat D. Terry, Another Minimal Programming Language, ACM SIGPLAN Notices No. 30 [1995]</ref>
* YAFL, a research language by Darius Blasband<ref>D. Blasband, The YAFL Programming Language, Second Edition, [1993]</ref>
Many other current programming languages have adopted features of Modula-2.
== Language elements ==
=== Reserved words ===
PIM [2,3,4] defines 40 [[reserved word]]s:
<pre>
Line 101 ⟶ 163:
</pre>
===
PIM [3,4] defines 29 built-in [[identifier]]s:
<pre>
ABS EXCL LONGINT REAL
BITSET FALSE LONGREAL SIZE
BOOLEAN FLOAT MAX TRUE
CAP HALT MIN TRUNC
CARDINAL HIGH NIL VAL
CHAR INC ODD
CHR INCL ORD
DEC INTEGER PROC
</pre>
== Embedded system use ==
Modula-2 is used to program many [[embedded system]]s.
=== Cambridge Modula-2 ===
Cambridge Modula-2 by Cambridge Microprocessor Systems is based on a subset of PIM4 with language extensions for embedded development. The compiler runs on [[DOS]] and it generates code for [[Motorola 68000 series]] (M68k) based embedded microcontrollers running a MINOS operating system.
=== Mod51 ===
Mod51 by Mandeno Granville Electronics is based on ISO Modula-2 with language extensions for embedded development following [[IEC 1131]], an industry standard for [[programmable logic controller]]s (PLC) closely related to Modula-2. The Mod51 compiler generates standalone code for 80C51 based microcontrollers.
=== Modula-GM ===
[[Delco Electronics]], then a subsidiary of GM [[Hughes Electronics]], developed a version of Modula-2 for embedded control systems starting in 1985. Delco named it Modula-GM. It was the first [[high-level programming language]] used to replace [[machine code]] (language) for embedded systems in Delco's ''engine control units'' (ECUs). This was significant because Delco was producing over 28,000 ECUs per day in 1988 for GM. This was then the world's largest producer of ECUs.<ref>Delco Electronics Electron Magazine, The Atwood Legacy, Spring '89, page 25</ref> The first experimental use of Modula-GM in an [[embedded controller]] was in the 1985 Antilock Braking System Controller which was based on the Motorola 68xxx microprocessor, and in 1993 Gen-4 ECU used by the [[Champ Car World Series]] Championship Auto Racing Teams (CART) and [[Indy Racing League]] (IRL) teams.<ref>[[Development of electronics for GM auto racing]]</ref> The first production use of Modula-GM was its use in GM trucks starting with the 1990 model year ''vehicle control module'' (VCM) used to manage GM Powertrain's [[Vortec]] engines. Modula-GM was also used on all ECUs for GM's 90° [[Buick V6 engine]] family 3800 Series II used in the 1997-2005 model year [[Buick Park Avenue]]. The Modula-GM compilers and associated software management tools were sourced by Delco from [[Intermetrics]].
Modula-2 was selected as the basis for Delco's high level language because of its many strengths over other alternative language choices in 1986. After Delco Electronics was spun off from GM (with other component divisions) to form [[Aptiv|Delphi Automotive Systems]] in 1995, global sourcing required that a non-proprietary high-level software language be used. ECU embedded software now developed at Delphi is compiled with commercial compilers for the language [[C (programming language)|C]].
=== Russian radionavigation satellites ===
The satellites of the Russian [[radionavigation-satellite service]] framework [[GLONASS]], similar to the United States [[Global Positioning System]] (GPS), are programmed in Modula-2.<ref>{{Cite web |last=Koltashev |first=A. A. |date=2006 |title=Modula-2 in Russian Space |url=http://www.kronos.ru/about/koltashev/<!-- Also at http://www.inr.ac.ru/~info21/texts/aakmodula2.htm --> |website=Kronos: History of a Project |publisher=xTech |language=ru |access-date=8 April 2021}}</ref>
== Compilers ==
* Amsterdam Compiler Kit (ACK) Modula-2 – for [[MINIX]]; [[freeware]]<ref>{{cite web |url=https://github.com/davidgiven/ack |title=ACK |last=Given |first=David |date=9 October 2020 |website=GitHub |access-date=13 March 2021}}</ref>
* ADW Modula-2 – for Windows, ISO compliant, ISO/IEC 10514-1, ISO/IEC 10514-2 (OO extension), ISO/IEC 10514-3 (Generic extension); freeware<ref>{{cite web |url=https://www.modula2.org/ |title=ADW Modula-2 |author=<!-- Unstated --> |date=<!-- Undated --> |website=Modula-2.org |access-date=13 March 2021}}</ref>
* Aglet Modula-2 – for [[AmigaOS]] 4.0 for [[PowerPC]]; freeware<ref>{{cite web |url=https://aglet.web.runbox.net/ |title=Aglet Modula-2 |author=<!-- Unstated --> |date=15 February 2012 |website=Aglet Modula-2 |access-date=13 March 2021}}</ref>
* Fitted Software Tools (FST) Modula-2 – for DOS; freeware<ref>{{Cite FTP |url=ftp://ftp.psg.com/pub/modula-2/fst/fst-40s.lzh |title=FST Modula-2 |last= |first= |date= |server=psg.com |url-status=dead |access-date=13 October 2021}}</ref>
* Gardens Point Modula-2 (GPM) – for BSD, Linux, OS/2, [[Oracle Solaris|Solaris]]; ISO compliant; freeware, as of 30 July 2014<ref>{{cite web |url=http://plas.fit.qut.edu.au/gpm/ |title=Gardens Point Modula |author=<!-- Unstated --> |date=29 January 2007 |website=Programming Languages and Systems Group, Faculty of Information Technology |publisher=Queensland University of Technology, Brisbane |access-date=13 March 2021 |url-status=dead |archive-url=https://web.archive.org/web/20130323002046/http://plas.fit.qut.edu.au/gpm/ |archive-date=23 March 2013}}</ref>
* Gardens Point Modula-2 (GPM/CLR) – for [[.NET Framework]]; freeware<ref>{{cite web |url=https://github.com/k-john-gough/gpmclr |title=Gardens Point Modula-2 (GPM/CLR) |author= K John Gough |date=25 October 2010 |website=GitHub |access-date=16 October 2022}}</ref>
* GNU Modula-2 – for GCC platforms, version 1.0 released 11 December 2010; compliance: PIM2, PIM3, PIM4, ISO; [[free software]], [[GNU General Public License]] (GPL)<ref>{{cite web |url=https://www.nongnu.org/gm2/ |title=GNU Modula-2 |author=<!-- Unstated --> |date=30 August 2018 |website=Savannah |publisher=Free Software Foundation |access-date=13 March 2021}}</ref>
* [[Logitech]]<ref name="jacobs1998409">{{Cite magazine |last=Jacobs |first=Chris |date=1984 |title=Turbo Pascal v2.0 |url=https://archive.org/details/Computer_Language_Issue_01_1984-09_CL_Publications_US/page/n72/mode/1up?view=theater |access-date=2025-04-06 |magazine=Computer Language |pages=71-74 |volume=1 |issue=1}}</ref> - they also had a "Real Time Kernel" for embedded usage (1987)<ref>{{cite web |title=Logitech Modula-2 |url=http://www.edm2.com/index.php/Logitech_Modula-2 |publisher=The Electronic Developer Magazine for OS/2 (EDM/2) |access-date=29 May 2022}}</ref><ref>{{cite web |title=1988: Modula-2 and Logitech RTK |date=12 April 2022 |url=https://www.teigfam.net/oyvind/home/technology/233-notes-from-the-vault-0x05/#modula-2_real_time_kernel_by_logitech |publisher=Øyvind Teig |quote=Photo of the floppy disk}}</ref>
* M2Amiga – for [[Amiga]]; [[free software]]<ref>{{cite web |url=https://m2amiga.claudio.ch/ |title=M2Amiga |last1=Degen |first1=René |last2=Nieder |first2=Claudio |last3=Preusing |first3=Bernd |last4=Schaub |first4=Markus |last5=Straube |first5=Jörg |date=2004 |website=Claudio's web site |publisher=A+L AG |access-date=13 March 2021 |url-status=live |archive-url=https://web.archive.org/web/20190120022439/https://m2amiga.claudio.ch/ |archive-date=20 January 2019}}</ref>
* M2M – by N. Wirth and collaborators from ETH Zurich, cross-platform, generates M-code for [[virtual machine]]; freeware<ref>{{cite web |url=https://www.astrobe.com/Modula2/ |title=Lilith and Modula-2 |author=<!-- Unstated --> |date=<!-- Undated --> |website=CFB Software |access-date=23 November 2023}}</ref>
* M2RT11 – by N. Wirth and collaborators from ETH Zurich, originally created for bootstrapping the [[Lilith (computer)|Lilith]]
* MacMETH – by N. Wirth and collaborators from ETH Zurich for Macintosh, Classic only; freeware<ref>{{cite web |url=https://www.sysecol2.ethz.ch/RAMSES/MacMETH.html |title=MacMETH: A Fast Modula-2 Language System for Macintosh Computers |author=<!-- Unstated --> |date=22 January 2020 |website=ETH Zurich: Terrestrial Systems Ecology |access-date=13 March 2021}}</ref>
* Mod51 – for the Intel 80x51 microcontroller family, ISO compliant, IEC1132 extensions; proprietary software<ref>{{cite web |url=http://www.designtools.co.nz/mod51.htm |title=Mod51 Structured Text Programming Language |author=<!-- Unstated --> |date=<!-- Undated --> |website=Design Tools |access-date=13 March 2021 |url-status=dead |archive-url=https://web.archive.org/web/20081021043956/http://www.designtools.co.nz/mod51.htm |archive-date=21 October 2008}}</ref>
* Megamax Modula-2 – for [[Atari ST]] with documentation; freeware<ref>{{cite web |url=https://www.tempel.org/files-e.html |last=Tempelmann |first=Thomas |title=Thomas Tempelmann's home page |date=1 September 2020 |access-date=18 March 2021}}</ref>
* Modula-2 R10 – reference compiler for this Modula; open-source, peer review<ref>{{cite web |url=https://modula-2.net/m2r10/ |title=Modula-2 R10 |access-date=13 October 2021}}</ref>
* ModulaWare – for [[OpenVMS]] ([[VAX]] and [[DEC Alpha|Alpha]]), ISO compliant; proprietary software<ref>{{cite web |url=http://www.modulaware.com/ |title=ModulAware |last=Dotzel |first=Chih-Ya |date=21 January 2020 |access-date=18 March 2021}}</ref>
* ORCA/Modula-2 – for [[Apple IIGS]] by The Byte Works for the Apple Programmer's Workshop
* p1 Modula-2 – for [[Macintosh]], [[Classic Mac OS|Classic]] and [[macOS]] ([[PowerPC]] and [[Carbon (API)]] only), ISO compliant; proprietary software<ref>{{cite web |url=https://modula2.awiedemann.de/ |title=p1 Modula-2 |last=Wiedemann |first=Albert |date=13 January 2021 |website=p1 Society for Computer Science |access-date=19 March 2021}}</ref>
* MOCKA – for various platforms, PIM compliant; commercial, freeware Linux/BSD versions<ref>{{Cite web |last1=Beck |first1=Michael |last2=Geiss |first2=Rubino |date=2006 |url=http://www.info.uni-karlsruhe.de/~modula/ |title=The Karlsruhe Modula-2 Compiler MOCKA |website=Institute for Program Structures and Data Organization (IPD) |publisher=[[Karlsruhe Institute of Technology]] |url-status=dead |archive-url=https://web.archive.org/web/20090904204227/http://www.info.uni-karlsruhe.de/~modula/index.php |archive-date=4 September 2009 |access-date=21 March 2021}}</ref>
* TDI Modula-2 – for [[Atari ST]], by TDI Software<ref name="apc198608_modula2">{{ cite magazine |url=https://archive.org/details/apc_1986_08/page/49/mode/1up |title=Modula-2 compiler |magazine=Australian Personal Computer |date=August 1986 |access-date=8 October 2022 |last1=Jefferson |first1=Gareth |pages=49, 52, 54, 56, 58}}</ref>
* Terra M2VMS – for [[OpenVMS]] ([[VAX]] and [[DEC Alpha|Alpha]]), PIM compliant; proprietary software<ref>{{Cite web |author=<!-- Unstated --> |date=12 November 2002<!--Page bottom--> |url=http://www.terraterra.ch/modula-2/spdm2vms.html |title=Modula-2 systems for OpenVMS/Alpha and OpenVMS/VAX |website=Terra Datentechnik |place=Erlenbach, Switzerland |language=en, de<!--Page bottom--> |access-date=23 March 2021}}</ref>
* m2c, Ulm Modula-2 System – for [[Oracle Solaris|Solaris]] (Sun [[SPARC]] and [[Motorola 68000 series|Motorola 68k]]); free software, [[GNU General Public License]] (GPL)<ref>{{Cite web |last1=Borchert |first1=Andreas |last2=Hasch |first2=Martin |date=21 January 2003 |url=https://www.mathematik.uni-ulm.de/modula/ |title=m2c: Ulm's Modula-2 System |website=Ulm University |place=[[Ulm]], Germany |language=en |access-date=23 March 2021}}</ref>
* XDS – ISO compliant, TopSpeed compatible library: ''Native XDS-x86'' for x86 (Windows and Linux); ''XDS-C'' for Windows and Linux (16- and 32-bit versions), targets C ([[C (programming language)#K&R C|K&R]] & [[ANSI C|ANSI]]); freeware<ref name="XDS">{{cite web |url=http://www.excelsior-usa.com/xds.html |title=XDS Family of Products: Modula-2 – Oberon-2 development tools |author=<!-- Unstated --> |date=1999–2009 |website=Excelsior LLC |url-status=dead |archive-url=https://web.archive.org/web/20090527060148/http://www.excelsior-usa.com/xds.html |archive-date=27 May 2009 |access-date=23 March 2021}}</ref>
===Turbo Modula-2===
{{anchor|turbo}}
Turbo Modula-2 was a compiler and an [[integrated development environment]] for [[MS-DOS]] developed, but not published, by [[Borland]]. Jensen and Partners, which included Borland cofounder Niels Jensen, bought the unreleased codebase and turned it into TopSpeed Modula-2. It was eventually sold to Clarion, now SoftVelocity, who then offered the Modula-2 compiler as part of its [[Clarion (programming language)|Clarion]] product line at that time.<ref>{{cite web |url=http://softvelocity.com/core/default.html |title=About Clarion |archive-url=https://web.archive.org/web/20021207222218/http://softvelocity.com/core/default.html |access-date=31 March 2023|archive-date=7 December 2002}}</ref>
A [[Zilog Z80]] [[CP/M]] version of Turbo Modula-2 was briefly marketed by Echelon under license from Borland. A companion release for [[Hitachi HD64180]] was sold by Micromint as a development tool for their SB-180 single-board computer.<ref>{{cite magazine |title=Circuit Cellar |magazine=[[Byte (magazine)|Byte: The Small Systems Journal]] |volume=11 |number=13 |page=98 |url=https://archive.org/details/byte-magazine-1986-12}}</ref>
===IBM Modula-
[[IBM]] had a Modula-2 compiler for internal use which ran on both [[OS/2]] and [[AIX]], and had first class support in IBM's [[E (PC DOS)|E2]] editor.<ref name="edm2">{{cite web |url=http://www.edm2.com/index.php/IBM_Modula-2 |title=IBM Modula-2 |date=2 March 2019 |website=edm2.com |access-date=2021-03-12}}</ref> IBM Modula-2 was used for parts of the [[OS/400]] ''Vertical Licensed Internal Code'' (effectively the kernel of OS/400).<ref>{{cite web |url=https://www.itjungle.com/2011/02/21/tfh022111-story06/ |title=Reader Feedback on AS/400 to i Mystery Solved |date=2011-02-21 |access-date=2021-03-12 |website=itjungle.com}}</ref> This code was mostly replaced with [[C++]] when OS/400 was ported to the [[IBM RS64]] processor family, although some remains in modern releases of the operating system.<ref name="inside-as400">{{cite book |last=Soltis |first=Frank G. |year=1997 |title=Inside the AS/400 |edition=2nd |url=https://books.google.com/books?id=5DoPAAAACAAJ |publisher=Duke Press |isbn=978-1882419661}}</ref><ref>{{cite mailing list|url=https://archive.midrange.com/mi400/200310/msg00008.html|title=Re: Re: MI emulator|author=Leif Svalgaard|date=2003-10-08|access-date=2021-02-26|mailing-list=MI400}}</ref> A [[Motorola 68000]] backend also existed, which may have been used in embedded systems products.<ref name="edm2"/>
== Operating systems ==
Modula-2 is used to program some [[operating system]]s (OSs). The Modula-2 module structure and support are used directly in two related OSs.
The OS named ''[[Lilith (computer)#Operating system|Medos-2]]'', for the Lilith workstation, was developed at ETH Zurich, by Svend Erik Knudsen with advice from Wirth. It is a single user, [[object-oriented operating system]] built from Modula-2 modules.<ref>
{{Cite thesis |last=Knudsen |first=Svend Erik |date=1983 |title=Medos-2: A Modula-2 Oriented Operating System for the Personal Computer Lilith |type=PhD |publisher=[[ETH Zurich]] |doi=10.3929/ethz-a-000300091|hdl=20.500.11850/137906}}<!-- also at http://e-collection.library.ethz.ch/eserv/eth:21975/eth-21975-02.pdf --></ref><ref>
{{Cite book |last=Knudsen |first=Svend Erik |date=25 October 2000 |chapter=Medos in Retrospect |editor1-last=Böszörményi |editor1-first=László |editor2-last=Gutknecht |editor2-first=Jürg |editor2-link=Jürg Gutknecht |editor3-last=Pomberger |editor3-first=Gustav |title=The School of Niklaus Wirth: The Art of Simplicity |pages=69–86 |publisher=Morgan Kaufmann |isbn=978-1558607231}} {{ISBN|1-55860-723-4}} & dpunkt, {{ISBN|3-932588-85-1}}.</ref><ref>
{{Cite magazine |last=Sand |first=Paul A. |date=September 1984 |title=The Lilith Personal Computer |magazine=[[Byte (magazine)|Byte]] |pages=300–311 |url=https://archive.org/details/BYTE_Vol_09-10_1984-09_Computer_Graphics/page/n309/mode/2up |access-date=6 March 2021}} Reprint.</ref>
The OS named ''[[Kronos (computer)#Operating system|Excelsior]]'', for the [[Kronos (computer)|Kronos]] workstation, was developed by the [[Academy of Sciences of the Soviet Union]], Siberian branch, [[Novosibirsk]] Computing Center, Modular Asynchronous Developable Systems (MARS) project, Kronos Research Group (KRG). It is a single user system based on Modula-2 modules.<ref name="Kronos-Excelsior">{{Cite web |last1=Kuznetsov |first1=D.N. |last2=Nedorya |first2=A.E. |last3=Tarasov |first3=E.V. |last4=Filippov |first4=V.E. |date=<!-- Undated --> |title=Kronos: a family of processors for high-level languages |url=http://www.kronos.ru/literature/processors |website=Kronos: History of a Project |publisher=xTech |language=ru |access-date=13 April 2021}}</ref>
== Books ==
*{{cite book |last=Gleaves |first=Richard |date=1984 |title=Modula-2 for Pascal Programmers |series=Springer Books on Professional Computing |edition=1st |url=https://link.springer.com/book/10.1007%2F978-1-4613-8531-8 |___location=Switzerland |publisher=Springer Nature |doi=10.1007/978-1-4613-8531-8 |isbn=978-0-387-96051-7 |s2cid=346624}}
*{{cite book |last=King |first=K. N. |date=1 January 1988 |title=Modula-2: A Complete Guide |url=http://knking.com/books/modula2/ |___location=[[Burlington, Massachusetts]] |publisher=Jones and Bartlett Publishers |isbn=978-0669110913}}
*{{cite book |last=Wirth |first=Niklaus |author-link=Niklaus Wirth |date=1988 |title=Programming in Modula-2 |edition=4th |url=https://link.springer.com/book/10.1007/978-3-642-83565-0 |___location=[[Berlin]] [[Heidelberg]] |publisher=[[Springer-Verlag]] |doi=10.1007/978-3-642-83565-0 |isbn=978-0-387-96051-7 |s2cid=41899609}}
*{{cite book |last=Cooper |first=Doug |date=1 September 1990 |title=Oh My! Modula-2: An Introduction to Programming |___location=[[New York City]], [[New York (state)|New York]] |publisher=[[W. W. Norton & Company]] |isbn=978-0393960099}}
*{{cite book |last=Helman |first=Paul |date=1 March 1998 |title=Walls and Mirrors: Intermediate Problem Solving and Data Structures: Modula, 2 (Benjamin/Cummings Series in Structured Programming) |publisher=[[Benjamin-Cummings]] |isbn=978-0805389456}}
*{{cite book |last=Sutcliffe |first=Richard J. |date=2004–2005 |title=Modula-2: Abstractions for Data and Programming Structures |url=https://www.arjay.bc.ca/Modula-2/Text/ |publisher=Arjay Books |isbn=978-0-669-11091-3}} Uses ISO-standard Modula-2.
== References ==
{{Reflist}}
== External links ==
*
{{
{{Wirth}}
{{Authority control}}
[[Category:Modula programming language family]]
[[Category:Systems programming languages]]
[[Category:Programming languages created in 1978]]
[[Category:Programming languages with an ISO standard]]
[[Category:Statically typed programming languages]]
[[Category:High-level programming languages]]
|