Hi,

On Mon, Jan 19, 2026 at 2:38 PM Paul Dufresne via Freedos-devel
<[email protected]> wrote:
>
> First I would like to mention gm2 (GNU Modula-2 compiler), a front-end in GCC 
> for Modula-2.

It took *years* to get into GCC. I'm quite glad it finally did.

> I don't expect a version for DJGPP, but it seems to be now an official 
> language of GCC:
> https://www.gnu.org/software/gcc/frontends.html
> https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gm2.pdf

Latest GCC is 15.2, I think? 16 comes probably in April.
(DJGPP has 14.2 but no gm2 port yet.)

I did recently port some simple code and tested it under Ubuntu
22.04.2 on x86_64 Linux (gm2 11.4).

Keep in mind that most Modula-2 compilers are PIM while a few do
indeed support ISO. GM2 tries to support both.

> After that I would like to mention ACK: Amsterdam Compiler Kit
> This is very old, but still slowly maitaned:
> https://github.com/davidgiven/ack
> A cross-compiler that supports ANSI C, Pascal, Modula 2, Basic for DOS 16 
> bits and 32 bits (among many platforms).

He has snapshots for Windows, but I don't think the DOS ports are well
tested yet. So there are some bugs. I've tried it (intermittently) a
few times over the years.

> While making it, there was about 10k steps, but work after that (very few 
> libs however).

I actually (also) tested my Modula-2 code with ACK but instead under
old Minix 2.0.4 (via DOSMinix under FreeDOS atop FAT16 under
VirtualBox.)

> But I guess what I consider the most interresting discovery is: FST 4.0 
> compiler.

Yes, ibiblio (FreeDOS mirror) has that too. I also added my old DJGPP
build of M2C.

> «Fitted Software Modula-2. last and now free version of the FST-compiler 
> (4.0).
> a good and compact programming-environment (like Turbo Pascal 3.0) for dos.
> the compiler isn't ISO-standard. »

The ISO standard (ISO 10514) was late in 1996 and somewhat unpopular.
It did standardize libraries, but it also added complex numbers,
exceptions, and did a few other odd things.

> This is a DOS 16 bit compiler for Modula-2.
> The IDE is very basic.

You're not forced to use the editor. You can batch compile from cmdline instead.

> It produce .exe in huge model (suppose to be able to do large too.

The smartlinker can omit some unused code if you use "m2link /o". (I
know you didn't really mean disk size,but still ....)

> For me this is interesting... small but quite powerfull language, not too 
> many libs...
> with .DEF file (equivalent of .h) to learn them (the libs).

Keep in mind the context shift from classic Pascal (no linker needed)
to Modula-2 (modularity meant for low-level code) and Oberon (merged
.def and .mod plus garbage collection and simple OOP).

There was also a third-party Modula-3 which GCC used to (unofficially)
support, primarily from DEC and former Xerox PARC people. To be
honest, a lot of these were somewhat in contrast to the (unnecessary)
complexity of Ada.

There are several Oberon compilers for DOS too, but most are 32-bit
(or need Japheth's HX). In particular, Oberon-M 1.2 supports 8086 /
186 but lacks range checking, floating point, or garbage collection
and needs a separate linker. Other than that, I usually use XDS
Modula-2 / Oberon or Spivey's Oxford Oberon.


_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to